Closed euphi closed 8 years ago
Could you try to remove .pioenvs
directory from the project?
I already tried without success (see "Steps to reproce")
Please add #include <Wire.h>
to the one of the file from your project. This is not a bug... It's behavior of PlatformIO 2.0. It doesn't look for nested libs by default.
The library build system in PlatformIO 3.0 is rewritten from the scratch and you won't have similar problems.
Other option is to enable lib_ldfcyclic
. See docs for platformio.ini. But I don't recommend to do it.
Thanks, that solved the problem. I thought, the framework libraries are in always in the include-path.
BTW: Are there some "best practices" how to develop for existing platform-IO libraries?
What I did:
This is somehow useful, but has drawbacks in IDE-integration (Eclipise).
What I really need is a library project in platformio, so I can have a real C++ project in eclipse and another C++ project (managed by platformio) referencing this library.
If you add new libs or modify platformio.ini, you need to reinit Eclipse project with pio init --ide eclipse -b defboard
BTW: Are there some "best practices" how to develop for existing platform-IO libraries?
You can clone https://github.com/loopj/i2c-sensor-hal to the project_dir/lib/Sensors
and then edit here.
Don't forget to re-init Eclipse project if you add new libraries to any of lib
folders. We have an issue for that to update project settings "on the fly".
If you have any questions, please use Community Forums http://community.platformio.org/
Thanks.
Configuration
Operating system: kubuntu 16.04
PlatformIO Version (
platformio --version
): PlatformIO, version 2.11.0Description of problem
After updating platforms and libs, Arduino include files are no longer found.
Steps to Reproduce
platformio update
platformio run
(problem is not solved by deleting .pioenvs)
Actual Results
Expected Results
Include files are found
Additional Information
The content of
platformio.ini
:To solve the problem, I added the build_flags to add path to "Wire" library. This is part of the framework/platform, so I expect platformio to do this automatically as it did in previous version.
Source file to reproduce issue:
I2C_arduino.cpp (part of lib 578 - sensors). In my case, it is not installed from platformio, but from github, because I plan to add a new sensor. I linked the git-source-directory to the platformio's project lib-dir: