How To Use .so files with catkin / cmake [closed]

asked 2016-10-07 08:21:09 -0600

ahrest gravatar image

updated 2022-01-22 16:16:33 -0600

Evgeny gravatar image

Hi,

i want to use the newest poco-libraries. I build them on my computer and copied the lib-files to my working directory (<package>/lib/Poco)

In the CMakeLists.txt i wrote this:

FIND_LIBRARY(POCO_UTIL PocoUtil ${PROJECT_SOURCE_DIR}/lib/Poco)
FIND_LIBRARY(POCO_NET PocoNet ${PROJECT_SOURCE_DIR}/lib/Poco)
FIND_LIBRARY(POCO_FOUNDATION PocoFoundation ${PROJECT_SOURCE_DIR}/lib/Poco)

## Specify libraries to link a library or executable target against
target_link_libraries(
  ${PROJECT_NAME}
  ${catkin_LIBRARIES}
  ${POCO_UTIL}
  ${POCO_FOUNDATION}
  ${POCO_NET}
)

While compiling, gcc takes the system libraries of poco which was instaled with ros kinetic as dependencies.

Any Idea?

Thanks.

System XUbuntu 16.04 Installed ROS-Kinetic while using ppa

edit:

I added the so-files directly like this:

target_link_libraries(
  ${PROJECT_NAME}
  ${catkin_LIBRARIES}
  ${PROJECT_SOURCE_DIR}/lib/Poco/libPocoUtil.so
  ${PROJECT_SOURCE_DIR}/lib/Poco/libPocoFoundation.so
  ${PROJECT_SOURCE_DIR}/lib/Poco/libPocoNet.so
)
edit retag flag offensive reopen merge delete

Closed for the following reason question is off-topic or not relevant. Please see http://wiki.ros.org/Support for more details. by ahrest
close date 2016-10-10 00:53:51.931816