RasPiArduino icon indicating copy to clipboard operation
RasPiArduino copied to clipboard

Error compiling for board RaspberryPI B+/2.

Open ethr0 opened this issue 3 years ago • 1 comments
trafficstars

I attempting to compile the radiolib/si443x/Si443x_Receive_Interrupt example for raspberry pi but it does not succeed,

it compiled successfully for Arduino Uno and ESP32.

for Raspberry Pi it gives to me a long error, every thing like that:


/home/jak/Arduino/libraries/RadioLib-master/src/protocols/FSK4/FSK4.h:68:37: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11 [enabled by default] uint32_t _shift = 0, _shiftHz = 0; ^ /home/jak/Arduino/libraries/RadioLib-master/src/protocols/FSK4/FSK4.h:69:29: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11 [enabled by default] uint32_t _bitDuration = 0; ^ In file included from /home/jak/Arduino/libraries/RadioLib-master/src/RadioLib.h:93:0, from /home/jak/Arduino/libraries/RadioLib-master/examples/Si443x/Si443x_Receive_Interrupt/Si443x_Receive_Interrupt.ino:18: /home/jak/Arduino/libraries/RadioLib-master/src/protocols/APRS/APRS.h:95:20: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11 [enabled by default] char _symbol = '>'; ^ /home/jak/Arduino/libraries/RadioLib-master/src/protocols/APRS/APRS.h:96:19: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11 [enabled by default] char _table = '/'; ^ exit status 1 Error compiling for board RaspberryPI B+/2.


can anybody help me,please??

ethr0 avatar Feb 14 '22 11:02 ethr0

I had the same issue, solved it by adding -std=gnu++11 to platforms.txt'scompiler.cpp.flags:

compiler.cpp.flags=-c -pipe -std=gnu++11

The issue is that RasPiArduino's c++ compiler defaults to some ancient version of C++.

matyasf avatar Feb 21 '22 08:02 matyasf