How do I build a package as a library in catkin?
I'm trying to build a c++ package as a library so that other packages can link to it. I've been working off the page http://docs.ros.org/api/catkin/html/howto/building_executables.html but no luck. It seems gcc is not getting the -PIC -shared flags etc.
catkin_make is giving me "undefined reference to `main'" and also is failing to link to basic ros classes even though roscpp is specified in all the usual places.
All worked well when the cpp and .h files were in the same package as an another cpp file which called classes in the file I want to make a library. Can I separate the .cpp files into separate packages and make the one without main() a library?