How to use a static library?
Specifically, I am trying use the RoBoIO library that comes with the RoBoard. The library consists of two folders: Include, which has all the .h files, and Lib, which has a .a file.
Without using ROS, I can use the functions provided by library by linking it through this MAKEFILE:
test.exe : test.o
gcc -o test.exe test.o -L../Lib -lRBIO -lstdc++
test.o : test.cpp
gcc -c test.cpp -I../Include
.PHONY : clean
clean :
-rm test.o test.exe
What do I need to do if I want the library to linked when I use rosmake to compile my program?? I tried to simply include the .h file, but that didn't work. The library functions became undefined.