Open mdaffin opened 10 years ago
See this project for an example of this issue.
Arduino-cmake is unable to build projects with either setup or loop defined in a library, when building with cmake the following error occurs:
Linking CXX executable blink.elf libuno_CORE.a(main.cpp.obj): In function `main': /usr/share/arduino/hardware/arduino/cores/arduino/main.cpp:11: undefined reference to `setup' /usr/share/arduino/hardware/arduino/cores/arduino/main.cpp:14: undefined reference to `loop' collect2: error: ld returned 1 exit status make[3]: *** [blink.elf] Error 1 make[2]: *** [CMakeFiles/blink.dir/all] Error 2 make[1]: *** [CMakeFiles/blink-upload.dir/rule] Error 2 make: *** [blink-upload] Error 2
However, the same library compiles and uploads fine using the arduino ide. The compile output from the ide can be found here
Hi, I think the problem is with the order the libraries that are linked. Could you run the build with:
VERBOSE=1 make
Verbose output available here
See this project for an example of this issue.
Arduino-cmake is unable to build projects with either setup or loop defined in a library, when building with cmake the following error occurs:
However, the same library compiles and uploads fine using the arduino ide. The compile output from the ide can be found here