-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Library file is not found if it's not #included in the sketch #3456
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
Comments
I didn't catch that: are you moving |
See the PS , I cannot put the file name in less than / greater than sings / brackets. |
Ah ok I see. Use a backtick like |
Ok, so the answer is that the IDE does not parse includes from non .ino files. You have to include address.h in one of your .ino for the IDE to look for the file and add that library path to the gcc command line ( |
So why does it work with search in parent director ( #include "header,h" ) files AKA #include "header.h" includes in local files. #include "CMain.h" in *inc works, I did not mention that search for includes in parent directory ( *.ino) works because it works, hence it is non issue to be publish. You have to include address.h in one of your .ino for the IDE to look for the file and add that library path to the gcc command line (-I param) This is not correct, I did not add any additional path to gcc to make the <> file included. Isn't that a function of OS ?? " and add that library path to the gcc command line (-I param)" |
What happens is that the IDE searches all your .ino files for #include lines. For each included header file it found, it tries to find a corresponding library that provides that header file. Then, while compiling, those libraries are added in the include path using When you put your include in the .h file, the IDE will not see it and thus not include the needed library in the include path and link. I hope this clarifies your question. |
No it does not clarify anything. |
Ultimately, this is the long-term solution. Well, that plus the other stuff discussed, which I intended to do as a second phase. Reworking this for the latest IDE code (which has changed dramatically since March) is on my TO-DO list. But I don't expect to work on it within the next couple months. Other (paid) work is currently taking priority over my (unpaid) open source contributions. Eventually I'll get back to that work. Until then, you'll have to learn to live with things as they are, or contribute yourself, or get others to do so, or just wait. |
This is just a question why, being posted here because I am tired of Arduino.cc forum morons personal insults, beside they are not qualified to intelligently answer my question anyway. .
But if you have a problem with me posting my question here just skip this post.
I have x.ino file with #include “CMain.h” where I have int main () function processing my application code. It all works just fine, no problem.
When I add #include<address.h> (#include left less than address.h right greater than) as first line in my x.ino my application compiles and still works.
When I move the #include<address.h> (#include left less than address.h right greater than) as first line in / into my CMain.h the compiler cannot find the file anymore, so I get “No such file or directory”.
What , why or who is stopping the Windows OS / compiler (?) search for the (#include left less than address.h right greater than) file ?
Just a question , I got no problem putting all my includes in x.ino file.
Thanks for your time
Vaclav
PS I can see #include left less than address.h right greater than during editing but when I post / save it the file name is missing !
The text was updated successfully, but these errors were encountered: