9 years, 1 month ago.

[Urgent]How to add static library (like lib.a) to mbed compiler ???

I have a project. My customer required it has to be close source. So i converted it to static library. I have already imported that lib.a into project but mbed compiler doesn't understand that lib. Is there any way to import that static library to make compiler understand ?? Thank you

2 Answers

9 years, 1 month ago.

What if you change the extension to .ar??

Accepted Answer

Thank you,i will try it :D.

posted by Thu Nguyen 13 Mar 2015
9 years, 1 month ago.

I think that the easiest way to do this would be to export the mbed project to an offline toolchain, such as GCC ARM Embedded, for which you can add to the Makefile in order to link the static library, since I'm not aware of any way a static library can be uploaded to the mbed online compiler.

Hope it helps!

Matthew

It can, should be .ar. There are even some exmaples, like freemaster_lib :-) closed source library

posted by Martin Kojtal 12 Mar 2015

I had no idea about that thanks for correcting it

posted by Matthew Else 12 Mar 2015

i have already done that, i exported it to offline GCC tool chain. And from that i configure makefile to build lib.a. But my customer required that code must be on compiler online. I will try to that lib.ar. Thank you for your help

posted by Thu Nguyen 13 Mar 2015