Compile - no errors and no binary

I created a library folder and initialized it to create the proper structure. I moved my .ino and .h files, uploaded it and when I include it in my program via a #include "thermistorLU.h" statement, everything works as expected.

However, if I click on the library button in the desktop IDE and ask it to be added to the current program, the program appears to compile, but I get an error indicating no compile errors and no binary created. The orange statement at the bottom of the screen starts with ! build didn't produce binary Error: Comma...

Also, if I add the library as mentioned in the preceding paragraph, do I still need to manually create the include statement? I guess I’m familiar with Build adding that automatically, so I didn’t know if it’s needed or not.

Libraries should have a .cpp file for the implementation. .ino files should only be used for the examples - and there is only one .ino allowed per project.

Can you post the full tree structure of your libeary?

1 Like

Ooops…I did have a .cpp file, not a .ino file

Here’s the structure:

Also, if I add ‘dependencies.thermistorLU=1.0.1’ to my project.properties file, I get the same issue.

OK, then we'll need to dig deeper :wink:

If it's not there in your project file, you will still need to add it yourself.
Unlinke Build, Dev does not know what your main project file is and hence won't add an #include statement automatically.

And if you want to get some more elaborate info about the cause of your troubles, you can always build via CLI.
Just navigate to your project folder thermistorLU end execute

particle compile photon . --saveTo firmware.bin --target 0.6.0

(assuming you are targetting a Photon with 0.6.0 on it - the dot there is intentional and needed for a "current folder build")

I just realized I may have manually added the library files to the library folder. I’ll remove those and see what happens. I’ve been trying to migrate all my projects and this one may have been missed. I hope it’s just a dumb error on my part. I’ll advise…

well…it appears to be a ID10T error on my part. I hadn’t noticed I had manually added the files to the lib folder. When I removed those files, the compile generated a binary that I’ll now test.

Sorry for wasting your time.

2 Likes