Open KevinRhyne opened 5 years ago
@KevinRhyne Hi there, apologies for the delay. I can detect a few problems with your cmake config which are causing issues:
file(GLOB SOURCES "src/*.cpp")
to add sources/headers to a target.
This is described in detail at the cmake docs.
Instead, list all of your sources manually.add_arduino_library
.
You can use find_arduino_library
which is supposed to be far more convenient, however this is not a requirement as it might not work under some circumstances.add_arduino_library
- You've specified only the header file of the library as the sources of the library, but this library also has other sources (mainly FastLED.cpp) which have to be included. This is described in detail in our wiki.I hope that's enough to get you going! Please update if that indeed solved your problems and feel free to continue and ask questions 😄
Hi,
I'm trying to use the FastLED library with Arduino-CMake-NG and getting linker errors while attempting to link FastLED.
My
make
output:My CMakeLists.txt is as follows:
My main.cpp is as follows:
Apologies in advance if this is due to my limited understanding of project structure. Any help would be greatly appreciated! Thank you!
OS: macOS OS Version: High Sierra Platform: Arduino Nano atmega328 Platform SDK Version: 1.8.9