Go Down

Topic: linking .a library files (Read 576 times) previous topic - next topic

samcx2

Hello,

Is there anyway to have the Arduino IDE link against a .a file? I have some custom libraries (.a files) and I would like to link these when compiling with the Arduino IDE.

Sam

Nachtwind

i dont know how to do that in the arduino-ide, but in the avr-project-ide i think to recall an options screen where you can add .a libraries to a project.
Believe me, Mike, I calculated the odds of this succeeding against the odds I was doing something incredibly stupid[ch8230] and I went ahead

samcx2

The Arduino-Project-IDE looks interesting, though I am more interested in trying to link .a (libraries) in the standard Arduino IDE.

I would love to know if there is a way to do this.

Thanks,
Sam




mellis

There isn't currently.  Do you have the source code to the .a?  You could link it from the .c / .cpp files.  Or even .o files should work, I think.

samcx2

I have the source code since I created the .a files. It is just more efficient if I can use just the single .a file than all the source files. Do you know if there are there plans to make this an option?

Thanks,
Sam

mellis

Not in the near term.  The source code to the core, libraries, and your sketch are all recompiled every time.  It's not efficient, but so far, it's been fine.  It makes it easier to modify the code on the fly.  

Go Up