Compilation error when C++11 is used

Hi.

I have downloaded a library that use “enum class … : …” types. It requires C++ 11 to compile correctly. When I have tried to compile selecting mbili board, console has launched an error. Searching in google and library’s github page, I have found that, as I have writen before, C++ 11 is required to properly compilation.

Since Arduino IDE 1.6.X, C++ 11 is set by default. At default arduino/avr/platform.txt, at compiler.cpp.flags statement you can find -std=gnu++11. However, at sodaq/avr/platform.txt this flag is not found so C++11 compilation failed. I have added this flag to sodaq/avr/platform.txt and now, compilation and examples work great.

Please, could you modify and solve it on your definitions? This way, I needn’t modify all my computers manually.

1 Like

Hi @jmpmscorp

Thanks for letting us know.
I made an internal task to solve this issue!

Best regards,
Jan

Hi again @Jan

Since I advised you about c++ flags, I have been using your platform.txt v 1.1.0 with my modification (only added -std=gnu++11 in compiler.cpp.flags). Today, I have installed your new platform.txt version 1.2.0.

Trying this version, I have had another problem. I have compiled a running program I have with your mbili board, working correctly in more than 5 mbilis. Compilation hasn’t shown errors, but program doesn’t run successfully.

I have checked both platform.txt versions and I have adviced two different flags added in version 1.2.0. -fno-fat-lto-objects and -flto in compiler.c.flags and -flto in elf and cpp flags. I have deleted manually this flags and now, my running program compiles and works well again.

Could you guide me how this flags works and why, if I delete them, everything works well again?? I can’t understand why program doesn’t run with this flags.

Thanks in advance.
Best regards.

Could you please turn on verbose output during compilation (from preferences) and post the output when you compile your code with the original flags.

Hi @GabrielNotman.

This is the output with verbose option.

In file included from D:\JM Aux\Documentos\Arduino\libraries\mqttsn-arduino\src/MQTTSNCommon.h:6:0,

             from D:\JM Aux\Documentos\Arduino\libraries\mqttsn-arduino\src/MQTTSNXbee.h:6,

             from D:\JM Aux\Documentos\Arduino\DOLE\dl-182\dl-182.ino:6:

D:\JM Aux\Documentos\Arduino\libraries\mqttsn-arduino\src/MQTTSNMsg.h:58:0: warning: ignoring #pragma region Messages [-Wunknown-pragmas]

#pragma region Messages Structures

^

D:\JM Aux\Documentos\Arduino\libraries\mqttsn-arduino\src/MQTTSNMsg.h:174:0: warning: ignoring #pragma endregion [-Wunknown-pragmas]

#pragma endregion

^

In file included from D:\JM Aux\Documentos\Arduino\libraries\mqttsn-arduino\src/MQTTSNXbee.h:6:0,

             from D:\JM Aux\Documentos\Arduino\DOLE\dl-182\dl-182.ino:6:

D:\JM Aux\Documentos\Arduino\libraries\mqttsn-arduino\src/MQTTSNCommon.h:13:6: warning: #warning “Debug mode is ON” [-Wcpp]

 #warning "Debug mode is ON"

  ^

In file included from D:\JM Aux\Documentos\Arduino\libraries\LiquidMenu\src/LiquidMenu.h:50:0,

             from D:\JM Aux\Documentos\Arduino\DOLE\dl-182\dl-182.ino:22:

D:\JM Aux\Documentos\Arduino\libraries\LiquidMenu\src/LiquidMenu_debug.h:23:0: warning: “DEBUG” redefined

#define DEBUG(x)

^

In file included from D:\JM Aux\Documentos\Arduino\libraries\mqttsn-arduino\src/MQTTSNXbee.h:6:0,

             from D:\JM Aux\Documentos\Arduino\DOLE\dl-182\dl-182.ino:6:

D:\JM Aux\Documentos\Arduino\libraries\mqttsn-arduino\src/MQTTSNCommon.h:8:0: note: this is the location of the previous definition

#define DEBUG

^

In file included from D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal/LiquidCrystal_I2C.h:35:0,

             from D:\JM Aux\Documentos\Arduino\DOLE\dl-182\dl-182.ino:21:

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal/LCD.h:89:40: warning: unused parameter ‘uSec’ [-Wunused-parameter]

inline static void waitUsec ( uint16_t uSec )

                                    ^

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal/LCD.h:486:43: warning: unused parameter ‘value’ [-Wunused-parameter]

virtual void setBacklightPin ( uint8_t value, t_backlighPol pol ) { };

                                       ^

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal/LCD.h:486:64: warning: unused parameter ‘pol’ [-Wunused-parameter]

virtual void setBacklightPin ( uint8_t value, t_backlighPol pol ) { };

                                                            ^

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal/LCD.h:505:40: warning: unused parameter ‘value’ [-Wunused-parameter]

virtual void setBacklight ( uint8_t value ) { };

                                    ^

In file included from D:\JM Aux\Documentos\Arduino\DOLE\dl-182\dl-182.ino:22:0:

D:\JM Aux\Documentos\Arduino\libraries\LiquidMenu\src/LiquidMenu.h:55:97: note: #pragma message: LiquidMenu: Configured for I2C. Edit ‘LiquidMenu_config.h’ file to change it.

#pragma message (“LiquidMenu: Configured for I2C. Edit ‘LiquidMenu_config.h’ file to change it.”)

                                                                                             ^

D:\JM Aux\Documentos\Arduino\DOLE\dl-182\dl-182.ino:46:5: warning: missing initializer for member ‘Valve::action’ [-Wmissing-field-initializers]

 };                                   

 ^

D:\JM Aux\Documentos\Arduino\DOLE\dl-182\dl-182.ino:71:3: note: in expansion of macro ‘buildTube’

buildTube(1);

^

D:\JM Aux\Documentos\Arduino\DOLE\dl-182\dl-182.ino:46:5: warning: missing initializer for member ‘Valve::eventFlag’ [-Wmissing-field-initializers]

 };                                   

 ^

D:\JM Aux\Documentos\Arduino\DOLE\dl-182\dl-182.ino:71:3: note: in expansion of macro ‘buildTube’

buildTube(1);

^

D:\JM Aux\Documentos\Arduino\DOLE\dl-182\dl-182.ino:46:5: warning: missing initializer for member ‘Valve::publishState’ [-Wmissing-field-initializers]

 };                                   

 ^

D:\JM Aux\Documentos\Arduino\DOLE\dl-182\dl-182.ino:71:3: note: in expansion of macro ‘buildTube’

buildTube(1);

^

D:\JM Aux\Documentos\Arduino\DOLE\dl-182\dl-182.ino:46:5: warning: missing initializer for member ‘Valve::subscription’ [-Wmissing-field-initializers]

 };                                   

 ^

D:\JM Aux\Documentos\Arduino\DOLE\dl-182\dl-182.ino:71:3: note: in expansion of macro ‘buildTube’

buildTube(1);

^

D:\JM Aux\Documentos\Arduino\DOLE\dl-182\dl-182.ino:46:5: warning: missing initializer for member ‘PressureTransducer::lastMeasureTime’ [-Wmissing-field-initializers]

 };                                   

 ^

D:\JM Aux\Documentos\Arduino\DOLE\dl-182\dl-182.ino:71:3: note: in expansion of macro ‘buildTube’

buildTube(1);

^

D:\JM Aux\Documentos\Arduino\DOLE\dl-182\dl-182.ino:46:5: warning: missing initializer for member ‘Tube::flowmeter’ [-Wmissing-field-initializers]

 };                                   

 ^

D:\JM Aux\Documentos\Arduino\DOLE\dl-182\dl-182.ino:71:3: note: in expansion of macro ‘buildTube’

buildTube(1);

^

D:\JM Aux\Documentos\Arduino\DOLE\dl-182\dl-182.ino: In function ‘void takeMeasures()’:

D:\JM Aux\Documentos\Arduino\DOLE\dl-182\dl-182.ino:319:62: warning: integer overflow in expression [-Woverflow]

if( now > lastGlobalMeasureTime + MIN_GLOBAL_MEASURES * 60 * 48)

                                                          ^

D:\JM Aux\Documentos\Arduino\DOLE\dl-182\dl-182.ino: In function ‘void valveAction(Valve*, byte)’:

D:\JM Aux\Documentos\Arduino\DOLE\dl-182\dl-182.ino:338:8: warning: variable ‘resultState’ set but not used [-Wunused-but-set-variable]

byte resultState = action;

    ^

D:\JM Aux\Documentos\Arduino\DOLE\dl-182\dl-182.ino: At global scope:

D:\JM Aux\Documentos\Arduino\DOLE\dl-182\dl-182.ino:448:97: warning: unused parameter ‘dataLength’ [-Wunused-parameter]

void onTopicMsg(unsigned int topicId, unsigned int topicIdType, const char * data, unsigned int dataLength, bool retain) {

                                                                                             ^

D:\JM Aux\Documentos\Arduino\libraries\hbridge\src\HBridge.cpp: In member function ‘boolean HBridge::toggle(boolean)’:

D:\JM Aux\Documentos\Arduino\libraries\hbridge\src\HBridge.cpp:108:1: warning: no return statement in function returning non-void [-Wreturn-type]

}

^

D:\JM Aux\Documentos\Arduino\libraries\hbridge\src\HBridge.cpp: In member function ‘boolean HBridge::toggle(int, boolean)’:

D:\JM Aux\Documentos\Arduino\libraries\hbridge\src\HBridge.cpp:104:1: warning: control reaches end of non-void function [-Wreturn-type]

}

^

In file included from D:\JM Aux\Documentos\Arduino\libraries\mqttsn-arduino\src\MQTTSNMsg.cpp:1:0:

D:\JM Aux\Documentos\Arduino\libraries\mqttsn-arduino\src\MQTTSNMsg.h:58:0: warning: ignoring #pragma region Messages [-Wunknown-pragmas]

#pragma region Messages Structures

^

D:\JM Aux\Documentos\Arduino\libraries\mqttsn-arduino\src\MQTTSNMsg.h:174:0: warning: ignoring #pragma endregion [-Wunknown-pragmas]

#pragma endregion

^

D:\JM Aux\Documentos\Arduino\libraries\mqttsn-arduino\src\MQTTSNMsg.cpp:6:0: warning: ignoring #pragma region Connect [-Wunknown-pragmas]

#pragma region Connect

^

D:\JM Aux\Documentos\Arduino\libraries\mqttsn-arduino\src\MQTTSNMsg.cpp:26:0: warning: ignoring #pragma endregion Connect [-Wunknown-pragmas]

#pragma endregion Connect

^

In file included from D:\JM Aux\Documentos\Arduino\libraries\mqttsn-arduino\src\MQTTSNCommon.h:6:0,

             from D:\JM Aux\Documentos\Arduino\libraries\mqttsn-arduino\src\MQTTSNCommon.cpp:1:

D:\JM Aux\Documentos\Arduino\libraries\mqttsn-arduino\src\MQTTSNMsg.h:58:0: warning: ignoring #pragma region Messages [-Wunknown-pragmas]

#pragma region Messages Structures

^

D:\JM Aux\Documentos\Arduino\libraries\mqttsn-arduino\src\MQTTSNMsg.h:174:0: warning: ignoring #pragma endregion [-Wunknown-pragmas]

#pragma endregion

^

In file included from D:\JM Aux\Documentos\Arduino\libraries\mqttsn-arduino\src\MQTTSNCommon.cpp:1:0:

D:\JM Aux\Documentos\Arduino\libraries\mqttsn-arduino\src\MQTTSNCommon.h:13:6: warning: #warning “Debug mode is ON” [-Wcpp]

 #warning "Debug mode is ON"

  ^

D:\JM Aux\Documentos\Arduino\libraries\mqttsn-arduino\src\MQTTSNCommon.cpp: In member function ‘boolean MQTTSNCommon::connect(const char*, int)’:

D:\JM Aux\Documentos\Arduino\libraries\mqttsn-arduino\src\MQTTSNCommon.cpp:14:17: warning: unused variable ‘result’ [-Wunused-variable]

     uint8_t result = _sendPacket(frameLength);

             ^

D:\JM Aux\Documentos\Arduino\libraries\mqttsn-arduino\src\MQTTSNCommon.cpp: In member function ‘void MQTTSNCommon::disconnect(unsigned int)’:

D:\JM Aux\Documentos\Arduino\libraries\mqttsn-arduino\src\MQTTSNCommon.cpp:42:17: warning: unused variable ‘result’ [-Wunused-variable]

     uint8_t result = _sendPacket(frameLength);

             ^

D:\JM Aux\Documentos\Arduino\libraries\mqttsn-arduino\src\MQTTSNCommon.cpp: In member function ‘boolean MQTTSNCommon::pingReq()’:

D:\JM Aux\Documentos\Arduino\libraries\mqttsn-arduino\src\MQTTSNCommon.cpp:57:13: warning: unused variable ‘result’ [-Wunused-variable]

 uint8_t result = _sendPacket(frameLength);

         ^

D:\JM Aux\Documentos\Arduino\libraries\mqttsn-arduino\src\MQTTSNCommon.cpp: In member function ‘void MQTTSNCommon::pingResp()’:

D:\JM Aux\Documentos\Arduino\libraries\mqttsn-arduino\src\MQTTSNCommon.cpp:82:13: warning: unused variable ‘result’ [-Wunused-variable]

 uint8_t result = _sendPacket(frameLength);

         ^

D:\JM Aux\Documentos\Arduino\libraries\mqttsn-arduino\src\MQTTSNCommon.cpp: In member function ‘void MQTTSNCommon::pubAck(uint8_t, uint16_t, uint8_t)’:

D:\JM Aux\Documentos\Arduino\libraries\mqttsn-arduino\src\MQTTSNCommon.cpp:87:13: warning: unused variable ‘result’ [-Wunused-variable]

 uint8_t result = _sendPacket(frameLength);

         ^

D:\JM Aux\Documentos\Arduino\libraries\mqttsn-arduino\src\MQTTSNCommon.cpp: In member function ‘boolean MQTTSNCommon::_publishCommon(uint8_t, uint8_t)’:

D:\JM Aux\Documentos\Arduino\libraries\mqttsn-arduino\src\MQTTSNCommon.cpp:124:13: warning: unused variable ‘result’ [-Wunused-variable]

 uint8_t result = _sendPacket(frameLength);

         ^

D:\JM Aux\Documentos\Arduino\libraries\mqttsn-arduino\src\MQTTSNCommon.cpp: In member function ‘boolean MQTTSNCommon::_subscribeCommon(uint8_t, unsigned int*)’:

D:\JM Aux\Documentos\Arduino\libraries\mqttsn-arduino\src\MQTTSNCommon.cpp:167:13: warning: unused variable ‘result’ [-Wunused-variable]

 uint8_t result = _sendPacket(frameLength);

         ^

D:\JM Aux\Documentos\Arduino\libraries\mqttsn-arduino\src\MQTTSNCommon.cpp: In member function ‘boolean MQTTSNCommon::_unsubscribeCommon(uint8_t)’:

D:\JM Aux\Documentos\Arduino\libraries\mqttsn-arduino\src\MQTTSNCommon.cpp:218:13: warning: unused variable ‘result’ [-Wunused-variable]

 uint8_t result = _sendPacket(frameLength);

         ^

D:\JM Aux\Documentos\Arduino\libraries\mqttsn-arduino\src\MQTTSNCommon.cpp: In member function ‘boolean MQTTSNCommon::searchGateway()’:

D:\JM Aux\Documentos\Arduino\libraries\mqttsn-arduino\src\MQTTSNCommon.cpp:277:17: warning: unused variable ‘result’ [-Wunused-variable]

     uint8_t result = _sendBroadcastPacket(frameLength);

             ^

D:\JM Aux\Documentos\Arduino\libraries\mqttsn-arduino\src\MQTTSNCommon.cpp: In member function ‘uint8_t MQTTSNCommon::searchGwAndConnectAsync(const char*, int)’:

D:\JM Aux\Documentos\Arduino\libraries\mqttsn-arduino\src\MQTTSNCommon.cpp:313:17: warning: variable ‘result’ set but not used [-Wunused-but-set-variable]

     uint8_t result;

             ^

In file included from D:\JM Aux\Documentos\Arduino\libraries\mqttsn-arduino\src\MQTTSNCommon.h:6:0,

             from D:\JM Aux\Documentos\Arduino\libraries\mqttsn-arduino\src\MQTTSNXbee.h:6,

             from D:\JM Aux\Documentos\Arduino\libraries\mqttsn-arduino\src\MQTTSNXbee.cpp:1:

D:\JM Aux\Documentos\Arduino\libraries\mqttsn-arduino\src\MQTTSNMsg.h:58:0: warning: ignoring #pragma region Messages [-Wunknown-pragmas]

#pragma region Messages Structures

^

D:\JM Aux\Documentos\Arduino\libraries\mqttsn-arduino\src\MQTTSNMsg.h:174:0: warning: ignoring #pragma endregion [-Wunknown-pragmas]

#pragma endregion

^

In file included from D:\JM Aux\Documentos\Arduino\libraries\mqttsn-arduino\src\MQTTSNXbee.h:6:0,

             from D:\JM Aux\Documentos\Arduino\libraries\mqttsn-arduino\src\MQTTSNXbee.cpp:1:

D:\JM Aux\Documentos\Arduino\libraries\mqttsn-arduino\src\MQTTSNCommon.h:13:6: warning: #warning “Debug mode is ON” [-Wcpp]

 #warning "Debug mode is ON"

  ^

D:\JM Aux\Documentos\Arduino\libraries\mqttsn-arduino\src\MQTTSNXbee.cpp: In member function ‘virtual uint8_t MQTTSNXbee::_sendPacket(uint8_t, boolean)’:

D:\JM Aux\Documentos\Arduino\libraries\mqttsn-arduino\src\MQTTSNXbee.cpp:37:13: warning: statement has no effect [-Wunused-value]

     0xFE;

         ^

D:\JM Aux\Documentos\Arduino\libraries\mqttsn-arduino\src\MQTTSNXbee.cpp: In member function ‘virtual uint8_t MQTTSNXbee::_sendBroadcastPacket(uint8_t)’:

D:\JM Aux\Documentos\Arduino\libraries\mqttsn-arduino\src\MQTTSNXbee.cpp:47:1: warning: no return statement in function returning non-void [-Wreturn-type]

}

^

D:\JM Aux\Documentos\Arduino\libraries\mqttsn-arduino\src\MQTTSNXbee.cpp: In member function ‘virtual uint8_t MQTTSNXbee::_sendPacket(uint8_t, boolean)’:

D:\JM Aux\Documentos\Arduino\libraries\mqttsn-arduino\src\MQTTSNXbee.cpp:39:1: warning: control reaches end of non-void function [-Wreturn-type]

}

^

D:\JM Aux\Documentos\Arduino\libraries\Sodaq_DS3231\src\Sodaq_DS3231.cpp: In constructor ‘DateTime::DateTime(long int)’:

D:\JM Aux\Documentos\Arduino\libraries\Sodaq_DS3231\src\Sodaq_DS3231.cpp:87:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

     if (days < 365 + leap)

              ^

In file included from D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal\LCD.cpp:46:0:

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal\LCD.h:89:40: warning: unused parameter ‘uSec’ [-Wunused-parameter]

inline static void waitUsec ( uint16_t uSec )

                                    ^

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal\LCD.h:486:43: warning: unused parameter ‘value’ [-Wunused-parameter]

virtual void setBacklightPin ( uint8_t value, t_backlighPol pol ) { };

                                       ^

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal\LCD.h:486:64: warning: unused parameter ‘pol’ [-Wunused-parameter]

virtual void setBacklightPin ( uint8_t value, t_backlighPol pol ) { };

                                                            ^

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal\LCD.h:505:40: warning: unused parameter ‘value’ [-Wunused-parameter]

virtual void setBacklight ( uint8_t value ) { };

                                    ^

In file included from D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal\LiquidCrystal.h:32:0,

             from D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal\LiquidCrystal.cpp:38:

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal\LCD.h:89:40: warning: unused parameter ‘uSec’ [-Wunused-parameter]

inline static void waitUsec ( uint16_t uSec )

                                    ^

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal\LCD.h:486:43: warning: unused parameter ‘value’ [-Wunused-parameter]

virtual void setBacklightPin ( uint8_t value, t_backlighPol pol ) { };

                                       ^

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal\LCD.h:486:64: warning: unused parameter ‘pol’ [-Wunused-parameter]

virtual void setBacklightPin ( uint8_t value, t_backlighPol pol ) { };

                                                            ^

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal\LCD.h:505:40: warning: unused parameter ‘value’ [-Wunused-parameter]

virtual void setBacklight ( uint8_t value ) { };

                                    ^

In file included from D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal\LiquidCrystal_SI2C.h:41:0,

             from D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal\LiquidCrystal_SI2C.cpp:43:

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal\LCD.h:89:40: warning: unused parameter ‘uSec’ [-Wunused-parameter]

inline static void waitUsec ( uint16_t uSec )

                                    ^

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal\LCD.h:486:43: warning: unused parameter ‘value’ [-Wunused-parameter]

virtual void setBacklightPin ( uint8_t value, t_backlighPol pol ) { };

                                       ^

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal\LCD.h:486:64: warning: unused parameter ‘pol’ [-Wunused-parameter]

virtual void setBacklightPin ( uint8_t value, t_backlighPol pol ) { };

                                                            ^

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal\LCD.h:505:40: warning: unused parameter ‘value’ [-Wunused-parameter]

virtual void setBacklight ( uint8_t value ) { };

                                    ^

In file included from D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal\LiquidCrystal_SR.h:84:0,

             from D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal\LiquidCrystal_SR.cpp:90:

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal\LCD.h:89:40: warning: unused parameter ‘uSec’ [-Wunused-parameter]

inline static void waitUsec ( uint16_t uSec )

                                    ^

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal\LCD.h:486:43: warning: unused parameter ‘value’ [-Wunused-parameter]

virtual void setBacklightPin ( uint8_t value, t_backlighPol pol ) { };

                                       ^

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal\LCD.h:486:64: warning: unused parameter ‘pol’ [-Wunused-parameter]

virtual void setBacklightPin ( uint8_t value, t_backlighPol pol ) { };

                                                            ^

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal\LCD.h:505:40: warning: unused parameter ‘value’ [-Wunused-parameter]

virtual void setBacklight ( uint8_t value ) { };

                                    ^

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal\LiquidCrystal_SR.cpp:111:37: warning: unused parameter ‘lines’ [-Wunused-parameter]

                         uint8_t lines, uint8_t font)

                                 ^

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal\LiquidCrystal_SR.cpp:111:52: warning: unused parameter ‘font’ [-Wunused-parameter]

                         uint8_t lines, uint8_t font)

                                                ^

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal\LiquidCrystal_SR.cpp:202:50: warning: unused parameter ‘pin’ [-Wunused-parameter]

void LiquidCrystal_SR::setBacklightPin ( uint8_t pin, t_backlighPol pol )

                                              ^

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal\LiquidCrystal_SR.cpp:202:69: warning: unused parameter ‘pol’ [-Wunused-parameter]

void LiquidCrystal_SR::setBacklightPin ( uint8_t pin, t_backlighPol pol )

                                                                 ^

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal\LiquidCrystal_SR.cpp:207:47: warning: unused parameter ‘mode’ [-Wunused-parameter]

void LiquidCrystal_SR::setBacklight ( uint8_t mode )

                                           ^

In file included from D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal\LiquidCrystal_I2C.h:35:0,

             from D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal\LiquidCrystal_I2C.cpp:37:

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal\LCD.h:89:40: warning: unused parameter ‘uSec’ [-Wunused-parameter]

inline static void waitUsec ( uint16_t uSec )

                                    ^

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal\LCD.h:486:43: warning: unused parameter ‘value’ [-Wunused-parameter]

virtual void setBacklightPin ( uint8_t value, t_backlighPol pol ) { };

                                       ^

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal\LCD.h:486:64: warning: unused parameter ‘pol’ [-Wunused-parameter]

virtual void setBacklightPin ( uint8_t value, t_backlighPol pol ) { };

                                                            ^

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal\LCD.h:505:40: warning: unused parameter ‘value’ [-Wunused-parameter]

virtual void setBacklight ( uint8_t value ) { };

                                    ^

In file included from D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal\LiquidCrystal_SR3W.h:62:0,

             from D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal\LiquidCrystal_SR3W.cpp:77:

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal\LCD.h:89:40: warning: unused parameter ‘uSec’ [-Wunused-parameter]

inline static void waitUsec ( uint16_t uSec )

                                    ^

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal\LCD.h:486:43: warning: unused parameter ‘value’ [-Wunused-parameter]

virtual void setBacklightPin ( uint8_t value, t_backlighPol pol ) { };

                                       ^

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal\LCD.h:486:64: warning: unused parameter ‘pol’ [-Wunused-parameter]

virtual void setBacklightPin ( uint8_t value, t_backlighPol pol ) { };

                                                            ^

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal\LCD.h:505:40: warning: unused parameter ‘value’ [-Wunused-parameter]

virtual void setBacklight ( uint8_t value ) { };

                                    ^

In file included from D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal\LiquidCrystal_I2C_ByVac.h:49:0,

             from D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal\LiquidCrystal_I2C_ByVac.cpp:34:

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal\LCD.h:89:40: warning: unused parameter ‘uSec’ [-Wunused-parameter]

inline static void waitUsec ( uint16_t uSec )

                                    ^

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal\LCD.h:486:43: warning: unused parameter ‘value’ [-Wunused-parameter]

virtual void setBacklightPin ( uint8_t value, t_backlighPol pol ) { };

                                       ^

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal\LCD.h:486:64: warning: unused parameter ‘pol’ [-Wunused-parameter]

virtual void setBacklightPin ( uint8_t value, t_backlighPol pol ) { };

                                                            ^

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal\LCD.h:505:40: warning: unused parameter ‘value’ [-Wunused-parameter]

virtual void setBacklight ( uint8_t value ) { };

                                    ^

In file included from D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal\SI2CIO.cpp:54:0:

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal\SoftI2CMaster.h:271:25: warning: unused parameter ‘addr’ [-Wunused-parameter]

bool i2c_start(uint8_t addr)

                     ^

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal\SoftI2CMaster.h:289:29: warning: unused parameter ‘addr’ [-Wunused-parameter]

bool i2c_rep_start(uint8_t addr)

                         ^

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal\SoftI2CMaster.h:314:30: warning: unused parameter ‘addr’ [-Wunused-parameter]

void i2c_start_wait(uint8_t addr)

                          ^

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal\SoftI2CMaster.h:361:24: warning: unused parameter ‘value’ [-Wunused-parameter]

bool i2c_write(uint8_t value)

                    ^

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal\SoftI2CMaster.h:438:23: warning: unused parameter ‘last’ [-Wunused-parameter]

uint8_t i2c_read(bool last)

                   ^

In file included from D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal\LiquidCrystal_SR1W.cpp:36:0:

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal\LiquidCrystal_SR1W.h:157:1: warning: multi-line comment [-Wcomment]

// | | 0.1uF | \

^

In file included from D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal\LiquidCrystal_SR1W.h:268:0,

             from D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal\LiquidCrystal_SR1W.cpp:36:

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal\LCD.h:89:40: warning: unused parameter ‘uSec’ [-Wunused-parameter]

inline static void waitUsec ( uint16_t uSec )

                                    ^

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal\LCD.h:486:43: warning: unused parameter ‘value’ [-Wunused-parameter]

virtual void setBacklightPin ( uint8_t value, t_backlighPol pol ) { };

                                       ^

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal\LCD.h:486:64: warning: unused parameter ‘pol’ [-Wunused-parameter]

virtual void setBacklightPin ( uint8_t value, t_backlighPol pol ) { };

                                                            ^

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal\LCD.h:505:40: warning: unused parameter ‘value’ [-Wunused-parameter]

virtual void setBacklight ( uint8_t value ) { };

                                    ^

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal\LiquidCrystal_SR1W.cpp:51:108: warning: unused parameter ‘lines’ [-Wunused-parameter]

void LiquidCrystal_SR1W::init(uint8_t srdata, t_sr1w_circuitType circuitType, t_backlighPol blpol, uint8_t lines, uint8_t font)

                                                                                                        ^

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal\LiquidCrystal_SR1W.cpp:51:123: warning: unused parameter ‘font’ [-Wunused-parameter]

void LiquidCrystal_SR1W::init(uint8_t srdata, t_sr1w_circuitType circuitType, t_backlighPol blpol, uint8_t lines, uint8_t font)

                                                                                                                       ^

In file included from D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal\LiquidCrystal_SR2W.h:125:0,

             from D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal\LiquidCrystal_SR2W.cpp:32:

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal\LCD.h:89:40: warning: unused parameter ‘uSec’ [-Wunused-parameter]

inline static void waitUsec ( uint16_t uSec )

                                    ^

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal\LCD.h:486:43: warning: unused parameter ‘value’ [-Wunused-parameter]

virtual void setBacklightPin ( uint8_t value, t_backlighPol pol ) { };

                                       ^

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal\LCD.h:486:64: warning: unused parameter ‘pol’ [-Wunused-parameter]

virtual void setBacklightPin ( uint8_t value, t_backlighPol pol ) { };

                                                            ^

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal\LCD.h:505:40: warning: unused parameter ‘value’ [-Wunused-parameter]

virtual void setBacklight ( uint8_t value ) { };

                                    ^

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal\LiquidCrystal_SR2W.cpp:48:93: warning: unused parameter ‘lines’ [-Wunused-parameter]

void LiquidCrystal_SR2W::init(uint8_t srdata, uint8_t srclock, t_backlighPol blpol, uint8_t lines, uint8_t font)

                                                                                         ^

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal\LiquidCrystal_SR2W.cpp:48:108: warning: unused parameter ‘font’ [-Wunused-parameter]

void LiquidCrystal_SR2W::init(uint8_t srdata, uint8_t srclock, t_backlighPol blpol, uint8_t lines, uint8_t font)

                                                                                                        ^

In file included from D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal/LiquidCrystal_I2C.h:35:0,

             from D:\JM Aux\Documentos\Arduino\libraries\LiquidMenu\src\LiquidMenu.h:53,

             from D:\JM Aux\Documentos\Arduino\libraries\LiquidMenu\src\LiquidSystem.cpp:30:

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal/LCD.h:89:40: warning: unused parameter ‘uSec’ [-Wunused-parameter]

inline static void waitUsec ( uint16_t uSec )

                                    ^

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal/LCD.h:486:43: warning: unused parameter ‘value’ [-Wunused-parameter]

virtual void setBacklightPin ( uint8_t value, t_backlighPol pol ) { };

                                       ^

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal/LCD.h:486:64: warning: unused parameter ‘pol’ [-Wunused-parameter]

virtual void setBacklightPin ( uint8_t value, t_backlighPol pol ) { };

                                                            ^

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal/LCD.h:505:40: warning: unused parameter ‘value’ [-Wunused-parameter]

virtual void setBacklight ( uint8_t value ) { };

                                    ^

In file included from D:\JM Aux\Documentos\Arduino\libraries\LiquidMenu\src\LiquidSystem.cpp:30:0:

D:\JM Aux\Documentos\Arduino\libraries\LiquidMenu\src\LiquidMenu.h:55:97: note: #pragma message: LiquidMenu: Configured for I2C. Edit ‘LiquidMenu_config.h’ file to change it.

#pragma message (“LiquidMenu: Configured for I2C. Edit ‘LiquidMenu_config.h’ file to change it.”)

                                                                                             ^

In file included from D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal/LiquidCrystal_I2C.h:35:0,

             from D:\JM Aux\Documentos\Arduino\libraries\LiquidMenu\src\LiquidMenu.h:53,

             from D:\JM Aux\Documentos\Arduino\libraries\LiquidMenu\src\LiquidScreen.cpp:30:

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal/LCD.h:89:40: warning: unused parameter ‘uSec’ [-Wunused-parameter]

inline static void waitUsec ( uint16_t uSec )

                                    ^

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal/LCD.h:486:43: warning: unused parameter ‘value’ [-Wunused-parameter]

virtual void setBacklightPin ( uint8_t value, t_backlighPol pol ) { };

                                       ^

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal/LCD.h:486:64: warning: unused parameter ‘pol’ [-Wunused-parameter]

virtual void setBacklightPin ( uint8_t value, t_backlighPol pol ) { };

                                                            ^

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal/LCD.h:505:40: warning: unused parameter ‘value’ [-Wunused-parameter]

virtual void setBacklight ( uint8_t value ) { };

                                    ^

In file included from D:\JM Aux\Documentos\Arduino\libraries\LiquidMenu\src\LiquidScreen.cpp:30:0:

D:\JM Aux\Documentos\Arduino\libraries\LiquidMenu\src\LiquidMenu.h:55:97: note: #pragma message: LiquidMenu: Configured for I2C. Edit ‘LiquidMenu_config.h’ file to change it.

#pragma message (“LiquidMenu: Configured for I2C. Edit ‘LiquidMenu_config.h’ file to change it.”)

                                                                                             ^

In file included from D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal/LiquidCrystal_I2C.h:35:0,

             from D:\JM Aux\Documentos\Arduino\libraries\LiquidMenu\src\LiquidMenu.h:53,

             from D:\JM Aux\Documentos\Arduino\libraries\LiquidMenu\src\LiquidLine.cpp:30:

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal/LCD.h:89:40: warning: unused parameter ‘uSec’ [-Wunused-parameter]

inline static void waitUsec ( uint16_t uSec )

                                    ^

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal/LCD.h:486:43: warning: unused parameter ‘value’ [-Wunused-parameter]

virtual void setBacklightPin ( uint8_t value, t_backlighPol pol ) { };

                                       ^

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal/LCD.h:486:64: warning: unused parameter ‘pol’ [-Wunused-parameter]

virtual void setBacklightPin ( uint8_t value, t_backlighPol pol ) { };

                                                            ^

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal/LCD.h:505:40: warning: unused parameter ‘value’ [-Wunused-parameter]

virtual void setBacklight ( uint8_t value ) { };

                                    ^

In file included from D:\JM Aux\Documentos\Arduino\libraries\LiquidMenu\src\LiquidLine.cpp:30:0:

D:\JM Aux\Documentos\Arduino\libraries\LiquidMenu\src\LiquidMenu.h:55:97: note: #pragma message: LiquidMenu: Configured for I2C. Edit ‘LiquidMenu_config.h’ file to change it.

#pragma message (“LiquidMenu: Configured for I2C. Edit ‘LiquidMenu_config.h’ file to change it.”)

                                                                                             ^

In file included from D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal/LiquidCrystal_I2C.h:35:0,

             from D:\JM Aux\Documentos\Arduino\libraries\LiquidMenu\src\LiquidMenu.h:53,

             from D:\JM Aux\Documentos\Arduino\libraries\LiquidMenu\src\LiquidMenu.cpp:30:

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal/LCD.h:89:40: warning: unused parameter ‘uSec’ [-Wunused-parameter]

inline static void waitUsec ( uint16_t uSec )

                                    ^

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal/LCD.h:486:43: warning: unused parameter ‘value’ [-Wunused-parameter]

virtual void setBacklightPin ( uint8_t value, t_backlighPol pol ) { };

                                       ^

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal/LCD.h:486:64: warning: unused parameter ‘pol’ [-Wunused-parameter]

virtual void setBacklightPin ( uint8_t value, t_backlighPol pol ) { };

                                                            ^

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal/LCD.h:505:40: warning: unused parameter ‘value’ [-Wunused-parameter]

virtual void setBacklight ( uint8_t value ) { };

                                    ^

In file included from D:\JM Aux\Documentos\Arduino\libraries\LiquidMenu\src\LiquidMenu.cpp:30:0:

D:\JM Aux\Documentos\Arduino\libraries\LiquidMenu\src\LiquidMenu.h:55:97: note: #pragma message: LiquidMenu: Configured for I2C. Edit ‘LiquidMenu_config.h’ file to change it.

#pragma message (“LiquidMenu: Configured for I2C. Edit ‘LiquidMenu_config.h’ file to change it.”)

                                                                                             ^

In file included from D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal/LiquidCrystal_I2C.h:35:0,

             from D:\JM Aux\Documentos\Arduino\libraries\LiquidMenu\src\LiquidMenu.h:53,

             from D:\JM Aux\Documentos\Arduino\libraries\LiquidMenu\src\recognizeType.cpp:7:

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal/LCD.h:89:40: warning: unused parameter ‘uSec’ [-Wunused-parameter]

inline static void waitUsec ( uint16_t uSec )

                                    ^

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal/LCD.h:486:43: warning: unused parameter ‘value’ [-Wunused-parameter]

virtual void setBacklightPin ( uint8_t value, t_backlighPol pol ) { };

                                       ^

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal/LCD.h:486:64: warning: unused parameter ‘pol’ [-Wunused-parameter]

virtual void setBacklightPin ( uint8_t value, t_backlighPol pol ) { };

                                                            ^

D:\JM Aux\Documentos\Arduino\libraries\Newliquidcrystal/LCD.h:505:40: warning: unused parameter ‘value’ [-Wunused-parameter]

virtual void setBacklight ( uint8_t value ) { };

                                    ^

In file included from D:\JM Aux\Documentos\Arduino\libraries\LiquidMenu\src\recognizeType.cpp:7:0:

D:\JM Aux\Documentos\Arduino\libraries\LiquidMenu\src\LiquidMenu.h:55:97: note: #pragma message: LiquidMenu: Configured for I2C. Edit ‘LiquidMenu_config.h’ file to change it.

#pragma message (“LiquidMenu: Configured for I2C. Edit ‘LiquidMenu_config.h’ file to change it.”)

                                                                                             ^

El Sketch usa 25816 bytes (19%) del espacio de almacenamiento de programa. El máximo es 130048 bytes.
Variables globales usan 1798 bytes de memoria dinamica.

Hi @jmpmscorp,

We try to be in sync with the official Arduino board files. I looked at the Arduino and SODAQ files and they are compatible.

LTO = Link Time Optimization
I think google can best tell you what it means and why it’s safe to remove the flags.

Currently you are the only one who has issues with these flags.
In the office we aren’t able to reproduce your issue.
If others read this thread and have the same issue, please let us know.

For now, your workaround, removing those flags is safe to use.

Best regards,
Jan