Skip to content

Error in library detection and compilation #2245

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

Closed
LostSnail42 opened this issue Aug 17, 2014 · 1 comment
Closed

Error in library detection and compilation #2245

LostSnail42 opened this issue Aug 17, 2014 · 1 comment
Assignees
Labels
Component: IDE The Arduino IDE
Milestone

Comments

@LostSnail42
Copy link

There seams to be a bug with the library detection. Libraries aren't detected correctly regardless of whether they are placed in the IDEs install libraries folder or the sketch libraries folder [though I had managed to get it to detect them at one point, can't remember how though.] It refuses to detect libraries that conform to the 1.0 library structure and libraries that follow the 1.5.x structure. Though the main portion that I wanted to cover is the inclusion of other libraries in a library. If a library is included from a file that does not use the ino extension [both files local to the sketch and libraries] then most included libraries seam to fail to be detected and compiled. It seams the IDE isn't including the libraries folder in the search path if it isn't the including file isn't of the ino extension. The only library that doesn't seam to be affected by this is the inclusion of the Arduino.h header, this includes just fine, but things like Wire.h are not found.

I would like to note that there is a hack to get everything to compile correctly, and that is to include all of the "missing" headers in the main ino of the sketch [though I see no reason that it wouldn't work for any ino in the sketch, it just happens to be that I am only using one of these, my other files are self created libraries that I am currently working on and are for personal use only.]

If clarity is needed for anything, please let me know, I'm more than happy to help.

@ffissore
Copy link
Contributor

Thanks @heisenberg42 : what you describe is the current and expected behaviour of the IDE. The sketch must include all the needed libraries, even those needed by other libraries and not directly by the sketch. #2792 tracks a proposed improvement

@ffissore ffissore added the Component: IDE The Arduino IDE label May 28, 2015
@ffissore ffissore added this to the Release 1.6.5 milestone May 28, 2015
@ffissore ffissore self-assigned this May 28, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: IDE The Arduino IDE
Projects
None yet
Development

No branches or pull requests

2 participants