Skip to content

Wire.h fails #276

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
paulvha opened this issue Oct 7, 2020 · 2 comments
Closed

Wire.h fails #276

paulvha opened this issue Oct 7, 2020 · 2 comments
Assignees

Comments

@paulvha
Copy link
Contributor

paulvha commented Oct 7, 2020

Running version 2.0.1.

Reproduce :
Make an empty sketch and just add at the top : #include "Wire.h"
Try to compile and it fails with:
In file included from /home/paul/Arduino/sketch_oct07a/sketch_oct07a.ino:1:
/home/paul/.arduino15/packages/SparkFun/hardware/apollo3/2.0.1/libraries/Wire/src/Wire.h:11:10: fatal error: Print.h: No such file or directory
#include "Print.h"

Root cause
Print.h is now in mbed-bridge/core-api/api directory.

Solution
Either change the line to #include "mbed-bridge/core-api/api/Print.h" or just remove #include "Print.h" from Wire.h

regards,
Paul

@oclyke oclyke self-assigned this Oct 12, 2020
@oclyke
Copy link
Contributor

oclyke commented Oct 13, 2020

@paulvha I could not reproduce this error on the current master branch
this include directive on its own should indeed fail to resolve (there is no complete search path direct to "print.h"), but on my system it did not
my preference would be to remove that include directive since it is already included by the ArduinoAPI.h header
opening a PR

@paulvha
Copy link
Contributor Author

paulvha commented Oct 14, 2020

I have just tried again. I am using IDE 1.8.13.
I have removed and reinstalled the 2.0.1 library to make sure I had not changed anything and make a clean start.
Empty sketch with only #include <Wire.h> in the top. Nothing else..no code. Try to compile give the error :

In file included from /home/paul/Arduino/sketch_oct12a/sketch_oct12a.ino:1:
/home/paul/.arduino15/packages/SparkFun/hardware/apollo3/2.0.1/libraries/Wire/src/Wire.h:10:10: fatal error: Print.h: No such file or directory
#include "Print.h"
^~~~~~~~~
Indeed it is not necessary to include the Print.h in this file, as it all compiles without any problem is commented out.

@oclyke oclyke closed this as completed in 4e7c92c Oct 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants