having issues compiling

having issues getting this to compile

#include <Arduino.h>
#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_BMP3XX.h>
#include <LSM303.h>
#include "I2Cdev.h"
#include "MPU6050.h"
LSM303 compass;
// If you plan on using an 8266-based board, specifically the Wemos D1 Mini, these are a MUST.  The Arduino/PlatformIO versions will crash the microcontroller
#include <ESP8266WiFi.h>
#include <ESPAsyncUDP.h>
//#if I2CDEV_IMPLEMENTATION == I2CDEV_ARDUINO_WIRE
// These are simplified drivers for only this application
// There are no publicly available drivers for the 4525DO or the RM3100 using SPI (there is an Rm3100 I2C driver)
#include "PitotStatic.h"

// Undotted firmware revision that gets sent with every packet
#define FIRMWARE_VERSION "200"

// Uncomment to enable debug prints
#define SERIAL_OUTPUT

MPU6050 accelgyro;
Adafruit_BMP3XX bmp;        // Adafruit BMP388 driver
PitotStatic     pitot;      // 4525DO pitot static driver struct
AsyncUDP        udp;        // UDP to/from Stratofier (using Stratux as an AP)

float           seaPress = 1013.25;    // Sea Level pressure in hPa
float           altitude;
int             iFromStratofier;
char            fromString[128];
uint8_t         udpString[128];
int             iSendLen;
IPAddress       stratux( 192, 168, 10, 255 );
sensors_event_t orient, gravity;
int             iHB = 0;
int16_t gx, gy, gz;
int16_t ax, ay, az;
void udpPacketHandler( AsyncUDPPacket packet )
{
  char fromStratofier[16];

  memcpy( fromStratofier, (char *)packet.data(), packet.length() );
  fromStratofier[packet.length()] = '\0';
  seaPress = atof( fromStratofier ) * 33.8638;
}


void setup()
{
#if I2CDEV_IMPLEMENTATION == I2CDEV_ARDUINO_WIRE
#elif I2CDEV_IMPLEMENTATION == I2CDEV_BUILTIN_FASTWIRE
  Fastwire::setup(400, true);
#endif

  pinMode( D0, OUTPUT );
  digitalWrite( D0, HIGH );
  Wire.begin();
  accelgyro.initialize();
  compass.init();
  compass.enableDefault();
 accelgyro.getMotion6(&ax, &ay, &az, &gx, &gy, &gz);
#ifdef SERIAL_OUTPUT
  Serial.begin( 921600 );
  Serial.println( "WingThing Started" );
#endif
  // Initialize the altimiter
  if ( !bmp.begin() )
  {
#ifdef SERIAL_OUTPUT
    Serial.println( "BMP388 Altitude Sensor not found." );
#endif
    while ( true )
      delay( 1000 );
  }
  bmp.setTemperatureOversampling( BMP3_OVERSAMPLING_32X );
  bmp.setPressureOversampling( BMP3_OVERSAMPLING_32X );
  bmp.setIIRFilterCoeff( BMP3_IIR_FILTER_DISABLE );

  // Initialize the magnetometer
 // mag.begin();

  // Initialize the orientation sensor


  // There is no init required for the airspeed sensor

  // Connect to the stratux
  WiFi.begin( "stratux" );
  if ( WiFi.waitForConnectResult() != WL_CONNECTED )
  {
#ifdef SERIAL_OUTPUT
    Serial.println("WiFi Failed");
#endif
    while ( true )
      delay( 1000 );
  }

  // Handler for incoming UDP data - currently only barometric pressure.
  if ( udp.listen( 45678 ) )
    udp.onPacket( udpPacketHandler );
}

void loop()
{
  compass.read();
 // Pitot();
  // Poll the altimiter
  if ( !bmp.performReading() )
  {
#ifdef SERIAL_OUTPUT
    Serial.println( "Cannot read BMP388 Altitude Sensor" );
#endif
    return;
  }
  altitude = bmp.readAltitude( seaPress ) + 363.0;    // Calibration offset is a simple addition


  // Poll the airspeed
  if ( !getPitotStatic( &pitot ) )
  {
#ifdef SERIAL_OUTPUT
    Serial.println( "Missed read of 4525DO Airspeed Sensor (not necessarily an error)" );
#endif
    return;
  }

  // Poll the magnetometer


  // Send the data over UDP
  sprintf( fromString,
           "%s,"
           "%.2f,"
           "%.2f,"
           "%.2f,"
           "%d,%d,%d,"
           "%.4f,%.4f,%.4f,"
           "%.4f,%.4f,%.4f",
           FIRMWARE_VERSION,
           pitot.airspeed,
           altitude,
           bmp.temperature,
           compass.m.x, compass.m.y, compass.m.z,
           &gx, &gy, &gz,
           compass.a.x, compass.a.y, compass.a.z
         );
  iSendLen = strlen( fromString );
  memcpy( udpString, fromString, iSendLen );

  AsyncUDPMessage msg( strlen( fromString ) );

  msg.write( udpString, iSendLen );
  udp.sendTo( msg, stratux, 45678 );

#ifdef SERIAL_OUTPUT
  sprintf( fromString,
           "FW: %s\n"
           "S: %.2f, "
           "A: %.2f, "
           "T: %.2f\n"
           "MAG: %d, %d, %d\n"
           "ORIENT: %.4f,%.4f,%.4f\n"
           "GFORCE: %.4f,%.4f,%.4f",
           FIRMWARE_VERSION,
           pitot.airspeed,
           bmp.readAltitude( seaPress ),
           bmp.temperature,
           compass.m.x, compass.m.y, compass.m.z
           &gx, &gy, &gz,
           compass.a.x, compass.a.y, compass.a.z
         );
  Serial.println( fromString );
#endif

  // Heartbeat every 4 seconds
  if ( iHB == 16 )
  {
    digitalWrite( D0, LOW );
    delay( 50 );
    digitalWrite( D0, HIGH );
    delay( 200 );
    iHB = 0;
  }
  else
    delay( 250 );

  iHB++;
}

error message:

Arduino: 1.8.13 (Windows 10), Board: "LOLIN(WEMOS) D1 R2 & mini, 80 MHz, Flash, Legacy (new can return nullptr), All SSL ciphers (most compatible), 4MB (FS:2MB OTA:~1019KB), v2 Lower Memory, Disabled, None, Only Sketch, 921600"

C:\Users\Quintin\Documents\Arduino\libraries\I2Cdev\I2Cdev.cpp: In static member function 'static int8_t I2Cdev::readBytes(uint8_t, uint8_t, uint8_t, uint8_t*, uint16_t)':

C:\Users\Quintin\Documents\Arduino\libraries\I2Cdev\I2Cdev.cpp:276:75: error: no matching function for call to 'min(uint8_t&, int)'

             for (uint8_t k = 0; k < length; k += min(length, BUFFER_LENGTH)) {

                                                                           ^

C:\Users\Quintin\Documents\Arduino\libraries\I2Cdev\I2Cdev.cpp:276:75: note: candidates are:

In file included from c:\users\quintin\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\2.5.0-4-b40a506\xtensa-lx106-elf\include\c++\4.8.2\algorithm:62:0,

                 from C:\Users\Quintin\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.3\cores\esp8266/Arduino.h:238,

                 from C:\Users\Quintin\Documents\Arduino\libraries\I2Cdev\I2Cdev.h:77,

                 from C:\Users\Quintin\Documents\Arduino\libraries\I2Cdev\I2Cdev.cpp:46:

c:\users\quintin\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\2.5.0-4-b40a506\xtensa-lx106-elf\include\c++\4.8.2\bits\stl_algo.h:4226:5: note: template<class _Tp, class _Compare> _Tp std::min(std::initializer_list<_Tp>, _Compare)

     min(initializer_list<_Tp> __l, _Compare __comp)

     ^

c:\users\quintin\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\2.5.0-4-b40a506\xtensa-lx106-elf\include\c++\4.8.2\bits\stl_algo.h:4226:5: note:   template argument deduction/substitution failed:

C:\Users\Quintin\Documents\Arduino\libraries\I2Cdev\I2Cdev.cpp:276:75: note:   mismatched types 'std::initializer_list<_Tp>' and 'unsigned char'

             for (uint8_t k = 0; k < length; k += min(length, BUFFER_LENGTH)) {

                                                                           ^

In file included from c:\users\quintin\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\2.5.0-4-b40a506\xtensa-lx106-elf\include\c++\4.8.2\algorithm:62:0,

                 from C:\Users\Quintin\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.3\cores\esp8266/Arduino.h:238,

                 from C:\Users\Quintin\Documents\Arduino\libraries\I2Cdev\I2Cdev.h:77,

                 from C:\Users\Quintin\Documents\Arduino\libraries\I2Cdev\I2Cdev.cpp:46:

c:\users\quintin\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\2.5.0-4-b40a506\xtensa-lx106-elf\include\c++\4.8.2\bits\stl_algo.h:4221:5: note: template<class _Tp> _Tp std::min(std::initializer_list<_Tp>)

     min(initializer_list<_Tp> __l)

     ^

c:\users\quintin\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\2.5.0-4-b40a506\xtensa-lx106-elf\include\c++\4.8.2\bits\stl_algo.h:4221:5: note:   template argument deduction/substitution failed:

C:\Users\Quintin\Documents\Arduino\libraries\I2Cdev\I2Cdev.cpp:276:75: note:   mismatched types 'std::initializer_list<_Tp>' and 'unsigned char'

             for (uint8_t k = 0; k < length; k += min(length, BUFFER_LENGTH)) {

                                                                           ^

In file included from c:\users\quintin\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\2.5.0-4-b40a506\xtensa-lx106-elf\include\c++\4.8.2\algorithm:61:0,

                 from C:\Users\Quintin\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.3\cores\esp8266/Arduino.h:238,

                 from C:\Users\Quintin\Documents\Arduino\libraries\I2Cdev\I2Cdev.h:77,

                 from C:\Users\Quintin\Documents\Arduino\libraries\I2Cdev\I2Cdev.cpp:46:

c:\users\quintin\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\2.5.0-4-b40a506\xtensa-lx106-elf\include\c++\4.8.2\bits\stl_algobase.h:239:5: note: template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare)

     min(const _Tp& __a, const _Tp& __b, _Compare __comp)

     ^

c:\users\quintin\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\2.5.0-4-b40a506\xtensa-lx106-elf\include\c++\4.8.2\bits\stl_algobase.h:239:5: note:   template argument deduction/substitution failed:

C:\Users\Quintin\Documents\Arduino\libraries\I2Cdev\I2Cdev.cpp:276:75: note:   deduced conflicting types for parameter 'const _Tp' ('unsigned char' and 'int')

             for (uint8_t k = 0; k < length; k += min(length, BUFFER_LENGTH)) {

                                                                           ^

In file included from c:\users\quintin\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\2.5.0-4-b40a506\xtensa-lx106-elf\include\c++\4.8.2\algorithm:61:0,

                 from C:\Users\Quintin\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.3\cores\esp8266/Arduino.h:238,

                 from C:\Users\Quintin\Documents\Arduino\libraries\I2Cdev\I2Cdev.h:77,

                 from C:\Users\Quintin\Documents\Arduino\libraries\I2Cdev\I2Cdev.cpp:46:

c:\users\quintin\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\2.5.0-4-b40a506\xtensa-lx106-elf\include\c++\4.8.2\bits\stl_algobase.h:193:5: note: template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&)

     min(const _Tp& __a, const _Tp& __b)

     ^

c:\users\quintin\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\2.5.0-4-b40a506\xtensa-lx106-elf\include\c++\4.8.2\bits\stl_algobase.h:193:5: note:   template argument deduction/substitution failed:

C:\Users\Quintin\Documents\Arduino\libraries\I2Cdev\I2Cdev.cpp:276:75: note:   deduced conflicting types for parameter 'const _Tp' ('unsigned char' and 'int')

             for (uint8_t k = 0; k < length; k += min(length, BUFFER_LENGTH)) {

                                                                           ^

Multiple libraries were found for "Adafruit_Sensor.h"

 Used: C:\Users\Quintin\Documents\Arduino\libraries\Adafruit_Sensor

 Not used: C:\Users\Quintin\Documents\Arduino\libraries\Adafruit_Sensor-master

exit status 1

Error compiling for board LOLIN(WEMOS) D1 R2 & mini.

The reason for this error is that the ESP8266 board platform uses a different implementation of min() than the official Arduino standardized API implementation. The ESP8266 implementation requires both arguments to be of the same data type, whereas the more forgiving Arduino implementation allows different argument types.

This means that some code which works perfectly on the standard Arduino boards won't compile for ESP8266. To make matters more confusing, the ESP8266 boards platform originally used the Arduino implementation before changing to the more strict one, so even some code that used to compile for ESP8266 no longer does.

Fortunately, the fix is very simple and the author of the I2Cdev library has already done it two years ago:

I guess you must have dug up some vintage version of the library somewhere.

So all you have to do is update to the latest version of the I2Cdev library and the error will be fixed! Make sure to get it from the official repository:
https://github.com/jrowberg/i2cdevlib/archive/master.zip

That fixed it,. Thanks

You're welcome. I'm glad to hear it's working now. Enjoy!
Per