-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed "optiLoad.h not found" error. #12
base: master
Are you sure you want to change the base?
Conversation
In newer versions of Arduino IDE (1.6.x and 1.8.3) optiLoader does not compile because the optiLoader.h file is included too many times. This was corrected by using pre-compiler IF statements.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The optiloader.ino change shouldn't be required (and aren't "standard practice"
Moving the header file optiLoader.h into a directory (./includes) prevents the Arduino IDE from automatically including it, causing conflicts.
I realized, this afternoon, that the Arduino IDE automatically includes all of the files in the root directory of a project and it expects them to be *.ino files. I ran into this issue today when I added the main optiloader code to my project as a cpp file. This threw tons of errors. This whole issue with optiLoader.h is solved by placing it inside of a directory, to prevent it from being auto included. |
Ok, this is getting a bit weird. I've duplicated your problem with a downloaded copy of optiLoader, but my "original" optiLoader (which nominally contains the same files) fails with the "bad include" message...
I've had the IDE get really confused when it hits unexpected file types (autosaves and backup versions of source, created when using an external editor, for example.) But having both the .h and .ino in the top level directory should work fine... |
Placing the files inside of the "optiLoader" folder will help ensure that the user has the project in a folder with a matching name and case.
Placing the files inside of the "optiLoader" folder will help ensure that the user has the project in a folder with a matching name and case.
I think you found it! It looks like Arduino checks that the names are the same, but ignores case. But, it seems that case alone can still break it. When I downloaded the project it is named OptiLoader-master and I just deleted the -master. That left me with the capital OptiLoader. In this fork I've moved the files into a correctly named folder and I restored them to your original files. I understand if you would like to make the changes yourself or fix it another way so that you don't get those 5 extraneous comits in your history. Anyway, I'm glad we got this firgured out. Thank you for your help. This is a really great project. It is the key to some production test stands that I'm building. |
In newer versions of Arduino IDE (1.6.x and 1.8.3) optiLoader does not compile because the optiLoader.h file is included too many times. This was corrected by using pre-compiler IF statements.