Web IDE can't find library header file

When I added the EmonLib library to my firmware, the Web IDE added the following lines to my code:

// This #include statement was automatically added by the Particle IDE.
#include <EmonLib.h>

When I compile, I get the error: “EmonLib.h: No such file or directory” and I see the same thing in the raw compile data …

src/faraday.cpp:2:21: fatal error: EmonLib.h: No such file or directory
compilation terminated.

I’ve tried clearing cache, restarting the browser, removing / re-adding the library, changing <> to “”, and some other things … Nothing has worked.

  • Compile target is a Xenon with 0,9.0 system firmware.
  • Library version is the latest: 1.1.2
  • the .h file is displayed when I view the library via the Web IDE
  • Compiling an example using same library version and same target generated no errors.
  • My firmware compiles fine when I comment out the #include and the code that was added to use the library.

I’m not sure where to go from here.

Okay, the issue was in the build recipe …

  • I had commented out everything related to the EmonLib, removed the EmonLib from my code and the Web IDE compiled it cleanly.
  • I removed the MQTT and OneWire libraries from my project using the Web IDE and to my surprise, the Web IDE still compiled my project without errors. It even flashed the code to my device with no libraries attached to the project.
  • It appears that build recipe was “frozen” somehow … so I decided to start over.

After I did the following, everything compiled cleanly:

  • created a new project
  • pasted in the .ino code from the original project
  • uncommented the lines related to EmonLib.
  • added the MQTT, OneWire, and EmonLib libraries

It would have been a lot easier if I could have just wiped out the build recipe. Does anyone know of a way to do that?