How to modify the library path for a sketch?

Hello,

for a sketch, I need to load 3rd party library A, which in turns #include’s some 3rd party library B.

Normally this is no problem - all libraries are in %DOCUMENTS%/Arduino/libraries, and the IDE automatically adds all the top-level directories in there to the include path.

For whatever reason, I now want to replace library B with another (modified) version. Normally, I would simply copy that library to somewhere else, modify the include path to contain that directory up front, and my sketch as well as library A would pick up my modified version.

Is there a way to achieve this with the Arduino IDE? Or do I have to leave the automatic build process of the IDE behind, and make my own Makefile or whatever with the barebones calls it does?

In addition, of course the actual library would be needed to be built as well then - I cannot simply move the library directory into my sketch folder; even if I point all #include’s at those files explicitely, it will then not build/link the .cpp/.c files in there…

Thank you!

AnotherArduinoGuy:
Is there a way to achieve this with the Arduino IDE?

Not that I know of. The idea is, when you edit a library it becomes a new library. Give it a new name and move on :slight_smile:

septillion:
Not that I know of. … move on.

Hm, ok. Google told me the same, basically - use the IDE for trivial sketches (trivial in the sense that they’re basically a file and can use all the defaults the IDE or 3rd party libs have to offer), and then move on to other tools.

I think I will try to work directly with the Atmel/AVR toolchain then or have a look at that Makefile solution.

Thanks for taking the time to answer, though!