Skip to content
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

Libraries in lib folder aren't recognised #740

Closed
ChrisAlphabet opened this issue Aug 5, 2016 · 8 comments
Closed

Libraries in lib folder aren't recognised #740

ChrisAlphabet opened this issue Aug 5, 2016 · 8 comments
Assignees
Milestone

Comments

@ChrisAlphabet
Copy link

Operating system:
Windows 10

PlatformIO Version (platformio --version):
PlatformIO, version 3.0.0.dev19

Description of problem

The project specific libraries in the lib folder are no longer recognised. If I move them to where I have defined ExternalLibs that are not project specific they are recognised.

@ivankravets
Copy link
Member

Run pio run --verbose. Do you see some "yellow warnings"?

@ChrisAlphabet
Copy link
Author

Nah, no yellow warnings. The only yellow text is "compilation terminated" after I get the fatal error saying "No such file or directory"

Reverting back to PlatformIO version 2.11.2 works but I'm trying to get unit testing up and running

@ChrisAlphabet
Copy link
Author

Interestingly, if I create another project and copy everything into lib it works but it doesn't find the external libraries.

When I add the external library directory to the project configuration file it finds the external libraries but not the ones in lib.

Am I doing something wrong when creating library directories? Will version 3 work differently to version 2?

@ivankravets
Copy link
Member

Yes, PlatformIO 3 has big difference in comparison to PlatformIO 2. We will write "migration" section in the docs.

Shortly, you need http://docs.platformio.org/en/feature-platformio-30/projectconf.html#lib-extra-dirs

@ChrisAlphabet
Copy link
Author

Ok, great. What do I have to change in the platformio.ini file to use lib_extra_dirs?

This is what I tried.

Cheers

platform = espressif
framework = arduino
board = nodemcu

[platformio]
lib_extra_dirs = ../../../ExternalLibs

@ivankravets
Copy link
Member

This is normal that it doesn't work. The lib_extra_dirs option should be applied to [env:] group.

@ChrisAlphabet
Copy link
Author

Hi, I know this tread is closed but moving the lib_extra_dirs option to the [:env] group didn't work with the way I was specifying the path.

To get it to work I needed to put the full path

[:env]
lib_extra_dirs = C:/full/path/to/library/folder

instead of
[:env]
lib_extra_dirs = ../../library

Cheers!

@ivankravets
Copy link
Member

@ChrisAlphabet please open separate issue with that. Thanks.

ivankravets added a commit that referenced this issue Sep 9, 2016
* develop:
  Fix incorrect line order when converting from INO to CPP and pointer is used
  Fix unit test
  Notify about `version` field when creating library
  Add support for SparkFun Blynk Board
  Return valid exit code from ``plaformio test`` command
  Disable SSL Server-Name-Indication for Python < 2.7.9
  Version bump to 3.0.1 (issue #772)
  Disable temporary SSL for PlatformIO services // Resolve #772
  Version bump to 3.0.0 (issues #770, #766, #747, #730, #765, #640, #659, #742, #459, #542, #763, #759, #753, #757, #749, #748, #745, #519, #709, #743, #413, #498, #410, #740, #361, #414, #554, #732, #588, #475, #461, #101, #719, #721, #537, #415, #522, #289, #556, #570, #456, #617, #432, #408, #479, #667, #510)
  Fix menu height for  docs
  Fix issue with multiple archives when linking firmware
  Add migration guide for PIO2 to PIO3
  Search libraries by headers/includes with ``platformio lib search --header`` option
  Update pio run command examples
  Add Unit Testing Demo
  Update PIO Plus badge title and link
  Add PlatformIO Plus badge
  Add links to PlatformIO Plus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants