The library example compiles OK with Arduino Nano, but fails to compile with Portenta H7.
Mostly complaints about Stream Class. The error messages are posted below - compiling the standard exmaple in the arduino library
In file included from \\server846c\DS_846a\Projects\EnviroWatch\Code\MainCode\EnviroWatch\SensorArray.ino:15:0:
C:\Users\Mydir\OneDrive - SALASOFT INC\Documents\Arduino\libraries\SparkFun_SGP40_Arduino_Library\src/SparkFun_SGP40_Arduino_Library.h:86:26: error: reference to 'Stream' is ambiguous
void enableDebugging(Stream &debugPort = Serial); //Turn on debug printing. If user doesn't specify then Serial will be used.
^~~~~~
In file included from C:\Users\Mydir\AppData\Local\Arduino15\packages\arduino\hardware\mbed_portenta\3.0.1\cores\arduino/api/ArduinoAPI.h:36:0,
from C:\Users\Mydir\AppData\Local\Arduino15\packages\arduino\hardware\mbed_portenta\3.0.1\cores\arduino/Arduino.h:27,
from C:\Users\Mydir\AppData\Local\Temp\arduino-sketch-FA96CBDF2D44F190F7468FE9F261C625\sketch\EnviroWatch.ino.cpp:1:
C:\Users\Mydir\AppData\Local\Arduino15\packages\arduino\hardware\mbed_portenta\3.0.1\cores\arduino/api/Stream.h:50:7: note: candidates are: class arduino::Stream
class Stream : public Print
^~~~~~
In file included from C:\Users\Mydir\AppData\Local\Arduino15\packages\arduino\hardware\mbed_portenta\3.0.1\cores\arduino/mbed/mbed.h:109:0,
from C:\Users\Mydir\AppData\Local\Arduino15\packages\arduino\hardware\mbed_portenta\3.0.1\cores\arduino/mbed.h:8,
from \\server846c\DS_846a\Projects\EnviroWatch\Code\MainCode\EnviroWatch\EnviroWatch.ino:15:
C:\Users\Mydir\AppData\Local\Arduino15\packages\arduino\hardware\mbed_portenta\3.0.1\cores\arduino/mbed/platform/include/platform/Stream.h:42:7: note: class mbed::Stream
class Stream : public FileLike, private NonCopyable<Stream> {
^~~~~~
In file included from C:\Users\Mydir\AppData\Local\Arduino15\packages\arduino\hardware\mbed_portenta\3.0.1\cores\arduino/api/ArduinoAPI.h:36:0,
from C:\Users\Mydir\AppData\Local\Arduino15\packages\arduino\hardware\mbed_portenta\3.0.1\cores\arduino/Arduino.h:27,
from C:\Users\Mydir\AppData\Local\Temp\arduino-sketch-FA96CBDF2D44F190F7468FE9F261C625\sketch\EnviroWatch.ino.cpp:1:
C:\Users\Mydir\AppData\Local\Arduino15\packages\arduino\hardware\mbed_portenta\3.0.1\cores\arduino/api/Stream.h:50:7: note: class arduino::Stream
class Stream : public Print
^~~~~~
In file included from \\server846c\DS_846a\Projects\EnviroWatch\Code\MainCode\EnviroWatch\SensorArray.ino:15:0:
C:\Users\Mydir\OneDrive - SALASOFT INC\Documents\Arduino\libraries\SparkFun_SGP40_Arduino_Library\src/SparkFun_SGP40_Arduino_Library.h:86:26: error: 'Stream' has not been declared
void enableDebugging(Stream &debugPort = Serial); //Turn on debug printing. If user doesn't specify then Serial will be used.
^~~~~~
In file included from \\server846c\DS_846a\Projects\EnviroWatch\Code\MainCode\EnviroWatch\SensorArray.ino:15:0:
C:\Users\Mydir\OneDrive - SALASOFT INC\Documents\Arduino\libraries\SparkFun_SGP40_Arduino_Library\src/SparkFun_SGP40_Arduino_Library.h:117:5: error: reference to 'Stream' is ambiguous
Stream *_debugPort; //The stream to send debug messages to if enabled. Usually Serial.
^~~~~~
In file included from C:\Users\Mydir\AppData\Local\Arduino15\packages\arduino\hardware\mbed_portenta\3.0.1\cores\arduino/api/ArduinoAPI.h:36:0,
from C:\Users\Mydir\AppData\Local\Arduino15\packages\arduino\hardware\mbed_portenta\3.0.1\cores\arduino/Arduino.h:27,
from C:\Users\Mydir\AppData\Local\Temp\arduino-sketch-FA96CBDF2D44F190F7468FE9F261C625\sketch\EnviroWatch.ino.cpp:1:
C:\Users\Mydir\AppData\Local\Arduino15\packages\arduino\hardware\mbed_portenta\3.0.1\cores\arduino/api/Stream.h:50:7: note: candidates are: class arduino::Stream
class Stream : public Print
^~~~~~
In file included from C:\Users\Mydir\AppData\Local\Arduino15\packages\arduino\hardware\mbed_portenta\3.0.1\cores\arduino/mbed/mbed.h:109:0,
from C:\Users\Mydir\AppData\Local\Arduino15\packages\arduino\hardware\mbed_portenta\3.0.1\cores\arduino/mbed.h:8,
from \\server846c\DS_846a\Projects\EnviroWatch\Code\MainCode\EnviroWatch\EnviroWatch.ino:15:
C:\Users\Mydir\AppData\Local\Arduino15\packages\arduino\hardware\mbed_portenta\3.0.1\cores\arduino/mbed/platform/include/platform/Stream.h:42:7: note: class mbed::Stream
class Stream : public FileLike, private NonCopyable<Stream> {
^~~~~~
In file included from C:\Users\Mydir\AppData\Local\Arduino15\packages\arduino\hardware\mbed_portenta\3.0.1\cores\arduino/api/ArduinoAPI.h:36:0,
from C:\Users\Mydir\AppData\Local\Arduino15\packages\arduino\hardware\mbed_portenta\3.0.1\cores\arduino/Arduino.h:27,
from C:\Users\Mydir\AppData\Local\Temp\arduino-sketch-FA96CBDF2D44F190F7468FE9F261C625\sketch\EnviroWatch.ino.cpp:1:
C:\Users\Mydir\AppData\Local\Arduino15\packages\arduino\hardware\mbed_portenta\3.0.1\cores\arduino/api/Stream.h:50:7: note: class arduino::Stream
class Stream : public Print
^~~~~~
In file included from C:\Users\Mydir\AppData\Local\Temp\arduino-sketch-FA96CBDF2D44F190F7468FE9F261C625\sketch\EnviroWatch.ino.cpp:1:0:
C:\Users\Mydir\AppData\Local\Arduino15\packages\arduino\hardware\mbed_portenta\3.0.1\cores\arduino/Arduino.h:105:16: error: cannot bind non-const lvalue reference of type 'int&' to an rvalue of type 'int'
#define Serial _UART_USB_
^
C:\Users\Mydir\AppData\Local\Arduino15\packages\arduino\hardware\mbed_portenta\3.0.1\cores\arduino/Arduino.h:105:16: note: in definition of macro 'Serial'
#define Serial _UART_USB_
^~~~~~~~~~
In file included from C:\Users\Mydir\AppData\Local\Arduino15\packages\arduino\hardware\mbed_portenta\3.0.1\cores\arduino/Arduino.h:102:0,
from C:\Users\Mydir\AppData\Local\Temp\arduino-sketch-FA96CBDF2D44F190F7468FE9F261C625\sketch\EnviroWatch.ino.cpp:1:
C:\Users\Mydir\AppData\Local\Arduino15\packages\arduino\hardware\mbed_portenta\3.0.1\cores\arduino/Serial.h:56:3: note: after user-defined conversion: virtual arduino::UART::operator bool()
operator bool();
^~~~~~~~
Compilation error: exit status 1
Any idea, best way to resolve this?
Thanks