Move your libraries into a subfolder named "libraries" within your sketchbook folder and you can access them as if the were in the libraries subfolder in the arduino main folder. This means you don't have to specify folders, just the .h files without the equally named folder.
You can also place the files in your sketch's folder and they will be found and compiled in. If you are making project specific changes to the code, this would likely be the better option.
wanderson:
You can also place the files in your sketch's folder and they will be found and compiled in. If you are making project specific changes to the code, this would likely be the better option.
I tried this option but that does not work either.
My folder structure looks like this:
--- Projectfolder (Folder)
--- AxisCtrl (Folder)
AxisCtrl.h
AxisCtrl.cpp
prj0009_CNCCtrl_v04.ino
And I include via
#include "AxisCtrl\AxisCtrl.h"
But I get the same error.
If I specify the full path the file is found.
But it would be much nicer to use relative paths or to
put the files in the sketchsfolder. It has to be possible
if you recommended that. What am Im doing wrong?
Did you restart the IDE after moving the files? Normally, if you have .h and .cpp files inside the sketch folder, they will be opened as tabs in the IDE, like this:
Solution dxw00d:
After restarting the IDE: it compiled! Thanks!
The downside is that I cant use a "keywords.txt" for more than
one class used in my project (seperated files).
Solution Pylon:
I think for organisation purposes this solution works for
me. The downside here is that I will/have to change the
skechbook folder for every project because I want the lib-directory
project specific. But I think this is worth the time!