Add static library to Makefile

Hi,

I would like to link libexample.a in my RIOT example, what should I add in the Makefile?

Thanks,

I tried to use APPDEPS += libexample.a Does not work

Hey,

Hi Kaspar!

BASELIBS += libexample.a makes it work!

Hi Baptiste!

Weird, Oleg, did you try to use the library? Could you include .h file which are inside .a library and use some functions. It was able to find the library .a but couldn't link with function inside the library

Baptiste,

Weird, Oleg, did you try to use the library? Could you include .h file which are inside .a library and use some functions. It was able to find the library .a but couldn't link with function inside the library

the libexample.a just contains one .o file with one function (`int my_add(int a, int b);`, see miniature-dangerzone/static_linked/main.c at master · OlegHahm/miniature-dangerzone · GitHub). This function gets linked and successfully called if you build the application.

Cheers, Oleg