Closed ghost closed 10 years ago
I don't know why but I had the same problem. Robot_Control seemed to get used for no reason at all and would not compile. I deleted it and then had to delete .build and it would then compile without that library.
In general ino seems to try to compile dependencies that are not actually used because they are inside #if something false.
This is because when Ino uses the first SPI.h it finds (when searching alphabetically, Robot comes before SPI), regardless of the parent directory. I ran into this when trying to include SPI.h and noticed others have the same problem.
As a workaround, I copied SPI.h from /usr/share/arduino/libraries/SPI/SPI.h
(Ubuntu) into my ino project's lib
directory, then included it as such:
#include "../lib/SPI.h"
This lets me compile at least, but it would be great if Ino was a little smarter about #include
-ing.
Ah, so there are actually two problems: One it finds include files from the wrong library and two it processes includes inside preprocessor conditional blocks that are false.
@hoosierEE I saw the resolve of #134 ,Whether can consider to set a fixed order about dependencies of the core library.
Hey @commissar this fixed it for me, I can ino build
without errors now. Thanks!
Hi,everybody. Description is not as good as the code to quickly. See the code :
The code is the test code,Note the first line of code: "#include"
This code generation dependencies.d is as follows:
Note the last line: Robot_Control/SPI.h????? is not SPI/SPI.h???? So the code didn't compile. and the build out is as fellows:
Oh, my work environment is OS X 10.8.5,Arduino IDE 1.0.5,Arduino uno r3
Any clues on this one?
Thanx