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

Enabling USER_LIB_PATH #135

Closed
wants to merge 1 commit into from
Closed

Enabling USER_LIB_PATH #135

wants to merge 1 commit into from

Conversation

ladislas
Copy link
Contributor

@ladislas ladislas commented Dec 2, 2013

Setting USER_LIB_PATH to path/to/my/project/libraries makes it easy to use your project specific libraries without out the pain of copying/symlinking them in the Arduino/libraries folder.

@peplin
Copy link
Contributor

peplin commented Dec 3, 2013

That should already be happening with your USER_LIB_PATH without this change. I think the changed line has to do with automatically scanning the source files for included libraries, but not changing the actual include path. That could still be a useful change, though.

@ladislas
Copy link
Contributor Author

ladislas commented Dec 3, 2013

maybe I'm doing something wrong, but before changing the file, adding USER_LIB_PATH := /path/to/my/project/libraries to my config makefile and not copying my libraries to ~/Documents/Arduino/libraries (I'm on a Mac) resulted in #include "MyAwesomeLib.h" - file does not exist....

After changing the file and still not copying my libs, everything compiles and runs seamlessly.

@peplin
Copy link
Contributor

peplin commented Dec 3, 2013

Ah, besides setting the path (which you've done correctly) you have to specify in the Makefile that you want to use the library: https://github.com/sudar/Arduino-Makefile#including-libraries

Even though that says "ARDUINO_LIBS", once you set the USER_LIB_PATH you can add user libs to it as well.

@ladislas
Copy link
Contributor Author

ladislas commented Dec 3, 2013

yep you're right.

but in my case, having the compiler automatically scan and include the libs I need is a lot easier. I can have a common makefile for all my programs and I don't have to tweak it each time I add or change a library

@peplin
Copy link
Contributor

peplin commented Dec 3, 2013

Yeah, agreed, might as well automatically pick up user libs too.

@sudar sudar closed this in e04bb4d Dec 5, 2013
@sudar
Copy link
Owner

sudar commented Dec 5, 2013

Thanks. Just merged it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants