I have read other posts regarding this issue, but none that seemed to match my situation. I must be missing something.
I have a project that was compiling w/o errors using Particle Dev about a month ago, but now I can’t get it to compile. I originally got the dreaded “compiler timed out or encountered an error” error. Following rickkas7, I changed the main file from Stepper.ino to Stepper.cpp, added #include “Particle.h” to it, and removed the project.properties file. That resulted in the “No such file or directory” error.
My project directory structure looks like this:
And the first lines of Stepper.cpp look like this:
#include "Particle.h" #include "ByteQue.h" #include "CmdHandler.h" #include "encoder.h" #include "powerSTEP01.h" #include "stepper.h" const String strVersion("v1.0:"); ...
When I compile in Particle Dev, I get
When I compile with CLI, I get:
Compiling code for photon
Including: lib\CmdHandler\src\CmdHandler.h lib\Encoder\src\encoder.h lib\powerSTEP01\src\powerSTEP01.h lib\powerSTEP01\src\powerSTEP01CfgStructs.h lib\powerSTEP01\src\powerSTEP01Const.h src\ByteQue.h src\stepper.h lib\CmdHandler\src\CmdHandler.cpp lib\Encoder\src\encoder.cpp lib\powerSTEP01\src\powerSTEP01.cpp lib\powerSTEP01\src\powerSTEP01Cfg.cpp lib\powerSTEP01\src\powerSTEP01Cmds.cpp lib\powerSTEP01\src\powerSTEP01Support.cpp src\ByteQue.cpp src\Stepper.cpp attempting to compile firmware _[build output for ByteQue.cpp, which succeeds]_ _[build output for Stepper.cpp, which fails with:]_ ... **src/Stepper.cpp:18:24: fatal error: CmdHandler.h: No such file or directory** #include "CmdHandler.h" ^ **compilation terminated.**
But “CmdHandler.h” was included in the list of files sent to the compiler, and this directory structure was working before. Any guidance?