I’m using gcc arm 4.9 to compile the latest firmware (v0.6.1) on ubuntu. I ran into an error:
…/wiring/inc/spark_wiring_error.h:61:34: error: reference to ‘system_error’ is ambiguous
I tracked it down to defining a “system_error” object in two places, one in the Particle firmware at:
firmware/services/inc/system_error.h,
and another in the gcc arm toolchain, located on my computer at:
/usr/local/gcc-arm-none-eabi-4_9-2015q3/arm-none-eabi/include/c++/4.9.3/system_error
I was able to get the firmware compiling by temporarily removing the gcc arm system_error class, but I am wondering if there is a more proper way to compile with this toolchain or if I am doing something wrong. I do not have any compile errors for previous firmware versions. Thanks!
I can build the firmware using gcc 4.9.3 with no problems. Do you use using namespace std in your application header files? If yes, then moving these statements to .cpp files should solve the problem (make sure to put them after all #include directives).
We’ll rename our internal system_error type to something else in next release to avoid this kind of errors.