hello!
i would like to configure clion (2016.1.3) to use with arduino plugin (GitHub - francoiscampbell/CLionArduinoPlugin: A plugin for CLion that enables arduino-cmake integration.), on windows 10.
i have followed this instructable: http://www.instructables.com/id/Setup-JetBrains-Clion-for-Arduino-Development/?ALLSTEPS . after some tinkering, now i can upload basic sketches and use the serial monitor.
however, i have one more question: what should i set up in clion to recognise the arduino libraries? they are marked with red in the ide, and it says: can not find 'SPI.h'. when i try to upload a sketch with some libs, at compilation says:
C:\Program Files (x86)\JetBrains\CLion 2016.1.3\bin\cmake\bin\cmake.exe" --build C:\Users\wanek\.CLion2016.1\system\cmake\generated\UNO-931ddf68\931ddf68\Debug --target upload -- -j 4
[ 86%] Built target uno_CORE
[ 89%] Built target uno_EEPROM
Scanning dependencies of target UNO
[ 93%] Building CXX object CMakeFiles/UNO.dir/UNO_UNO.ino.cpp.obj
C:/Users/wanek/ClionProjects/UNO/UNO.ino:53:63: fatal error: SPI.h: No such file or directory
#include <SPI.h> //for digipot serial interface
^
compilation terminated.
mingw32-make.exe[3]: *** [CMakeFiles/UNO.dir/UNO_UNO.ino.cpp.obj] Error 1
mingw32-make.exe[2]: *** [CMakeFiles/UNO.dir/all] Error 2
mingw32-make.exe[1]: *** [CMakeFiles/upload.dir/rule] Error 2
CMakeFiles\UNO.dir\build.make:65: recipe for target 'CMakeFiles/UNO.dir/UNO_UNO.ino.cpp.obj' failed
CMakeFiles\Makefile2:99: recipe for target 'CMakeFiles/UNO.dir/all' failed
CMakeFiles\Makefile2:249: recipe for target 'CMakeFiles/upload.dir/rule' failed
Makefile:182: recipe for target 'upload' failed
mingw32-make.exe: *** [upload] Error 2
after a breif advice on the instructables, i've moved all my arduino libs in the folder 'c:\Program Files (x86)\Arduino\libraries'.
now clion finds them (as external libraries), but they are not active. i permanently got the: 'some source files are located outside of cmakelists.txt directory. you can change the project root, or ignore this in future' warning.
(see attached image)
i have reloaded the project, restarted clion, restarted windows, deleted temp files, etc, but nothing helps.
my original arduino 1.6.9 ide works perfectly, the libs are recognised and i can upload the same sketch.
has anybody already succeeded with configuring clion for arduino, in a windows environment?
thank you for help!