I have been putting my files into folders in the Dev IDE to aid organisation and my sanity
However since I did this any errors on compilation link to an empty .ino or .h file instead of the correct file.
For example I compile my project with an error in foo.cpp, the compiler says the correct line but says the error is in foo.ino. Clicking the error takes me to foo.ino which is an empty file.
For example I compile my project with an error in foo.h, the compiler says the correct line and the correct file foo.h. Clicking the link takes me to foo.h which is an empty file.
Is this a known issue with using folders in the Dev IDE or have I missed something?
Can you actually compile anything successfully when using folders ?
AFAIK the cloud compiler only takes the files in the root dir of your project, but that may have changed since I started using dev.
I’ve seen the same issue, but didn’t report the bug. Looking at the GitHub repo, I didn’t see a bug, so I filed a bug report here: https://github.com/spark/particle-dev-app/issues/6. Feel free to watch it on GitHub.
To address @mora’s question, I use subfolders in almost all my (current) projects. I don’t think I’ve run into the issue. Dev just flattens the file tree as it sends files to the cloud compiler, so #include statement’s paths should not include the subfolder. If you follow that rule, subfolders work fine.
[edit to add an example, since my language was kinda ambiguous]
For example:
Say I’ve got a subfolder called cool-lib and a cool.h file in there. In my main .cpp or .ino file, I’d do: #include "cool.h" not #include "cool-lib/cool.h"
Hey, I’ve noticed this issue too and it is quite infuriating.
I’ve uploaded a video capture to YouTube that shows what the user experience is with this error:
EDIT:
note that not only are the file names wrong, the line numbers referenced in the compiler error message are wrong too (it appears they are referencing line numbers after blank lines are removed???)