link library from devel/lib
Hi,
I'm pretty sure that this question has been answered already, but for some reason I'm not able to find the right solution, and currently I am confused by the results I read. So I hope you can point me in the right direction.
I have created a library in one package, using the install() command of the cmakelists. This Library does appear in my workspaces devel/lib, as "libMYLIB.so". I want to use this library within another package, but I'm not exactly sure how. I tried it with just using
target_link_libraries(${PROJECT_NAME}_node
${catkin_LIBRARIES}
MYLIB )
But i get the error
/usr/bin/ld: cannot find -lMYLIB collect2: error: ld returned 1 exit status
I tried using
link_directories( ${CATKIN_PACKAGE_LIB_DESTINATION} )
, since this directory was used to install the library, but to no effect. What should I do, or where can I find the definite answer?