Quantcast
Channel: ROS Answers: Open Source Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 23

How to use a static library?

$
0
0
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.

Viewing all articles
Browse latest Browse all 23

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>