-
-
Notifications
You must be signed in to change notification settings - Fork 792
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
How to include/use Arduino's standard libraries? #195
Comments
Hi @ncolomer! |
Hi @valeros
Thus, a workaround should be to do all the includes in the main file (to explicitly tell platformio to add the libraries in the build I imagine), and repeat them in my headers/implem files, WDYT? |
PlatformIO scans for includes all source files "*.c, *.cpp, *.h". It should work for you. Could I ask you to share a simple project where I can reproduce this issue? Thanks in advance! With best regards, Ivan Kravets
|
Hi @ivankravets :) |
Thanks! This bug is fixed in the latest P.S; I'm going to release 1.5.0 this week, where this issue will be fixed. |
This is a duplicate of #189 |
Great! Thanks a lot @ivankravets @valeros :) |
Is it broken again in 1.6.5? I have the exact same issue, with the exact same fix... If I include the #include in my main ino file, all works fine. I don't reference anything from that header, but I have to include it. Thoughts? |
@Jeppedy please provide the problem project to reproduce this issue |
Same problem here, using embedXcode and Xcode to compile a sketch agains Arduino IDE 1.6.7.
|
@evanlooij please use |
Same issue, I use the platformio CLI to compile and flash. When I write Same for my own libraries, I have to include them all in my |
After some research, it's finally working using this fix (enable deep search for dependent libraries) |
@tdehaeze I also encounter this issue. Can you show me how to fix it with a Thank you. |
IDE 1.71, Core 3.2.1, on Windows 7, I have a similar issue, i managed to replicate it. My issue was that I created a file in my project called 'eeprom.h', which I included like this: '#include "eeprom.h"'. Having said this, I would like to stipulate that this issue is not seen on my linux, command-line box! |
@tdehaeze , @mintisan , @bitflogger could you provide a project example to reproduce this issue? |
I'm seeing exactly the same issue with including EEPROM.h Copy of the project is attached and this compiles fine in the Arduino IDE. The file /Users/josh/.platformio/packages/framework-arduinoavr/libraries/EEPROM/src/EEPROM.h does exist and is readable by platform io |
@noisymime please add |
@ivankravets Thanks Ivan, that fixed it (Needed to be added to |
- See platformio/platformio-core#195 Signed-off-by: Martin Mihálek <[email protected]>
Hello,
Referring to a previous comment here, I still face a problem when I want to include an Arduino standard library, in my case, Arduino's
EEPROM.h
library.I figured out that the library files are present in the platformio path
~/.platformio/packages/framework-arduinoavr/libraries/EEPROM/EEPROM.h
. I imagine they've been downloaded while installing theatmelavr
platform.How to include and use those standard libs correctly?
I expected something simple as with the Arduino IDE where we only need to add
#include <EEPROM.h>
I'm using the latest platformio stable version 1.4.0 with Eclipse CDT IDE.
My
platformio.ini
file looks the following:The text was updated successfully, but these errors were encountered: