I have a library and in my library I try to #include <wire.h> and I get a "file not found" error. If I put the include into my main pde file, everything works fine. If I look into the built-in libraries w51000 for example, it includes <SPI.h>. I am unclear why my library files cannot seem to get to the system headers.
I am a seasoned C programmer and I have a solid grasp of how includes work, so I am having trouble figuring out why this isn't working. Any insight would be greatly appreciated.
I am a seasoned C programmer and I have a solid grasp of how includes work, so I am having trouble figuring out why this isn't working.
You are having problems because the Arduino IDE does not deal with include files in the normal way.
The sketch is copied to a temporary location, along with all included files, and the corresponding source files.
If the sketch does not reference Wire.h, Wire.h and Wire.cpp are not copied to the temporary location. Files that are not copied there can not then be found there.
In order to use Wire.h in your library, you have to include it in the sketch, too.