Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

List the libraries you want to link in the target_link_libraries section of your CMakeLists.txt.

List the libraries you want to link in the target_link_libraries section of your CMakeLists.txt.

Edit:

Here's a little example:

set(LIB_DIR ${PROJECT_SOURCE_DIR}/lib)
set(MY_LIBS ${LIB_DIR}/libMINTERFACE.so.0)

target_link_libraries(your_node
    ${catkin_LIBRARIES} 
    ${MY_LIBS}
)

List the libraries you want to link in the target_link_libraries section of your CMakeLists.txt.

Edit:

Here's a little example:

set(LIB_DIR ${PROJECT_SOURCE_DIR}/lib)
set(MY_LIBS ${LIB_DIR}/libMINTERFACE.so.0)

target_link_libraries(your_node
    ${catkin_LIBRARIES} 
    ${MY_LIBS}
)

This assumes that your libs are located in a directory called 'lib' inside your package.

List the libraries you want to link in the target_link_libraries section of your CMakeLists.txt.

Edit:

Here's a little example:

set(LIB_DIR ${PROJECT_SOURCE_DIR}/lib)
set(MY_LIBS ${LIB_DIR}/libMINTERFACE.so.0)

target_link_libraries(your_node
    ${catkin_LIBRARIES} 
    ${MY_LIBS}
)

This assumes that your libs are located in a directory called 'lib' inside your package.

Edit2:

This answer does not solve this question. After providing more information it revealed that the questioner uses rosbuild.

List the libraries you want to link in the target_link_libraries section of your CMakeLists.txt.

Edit:

Here's a little example:The auto generated CMakeLists.txt states the solution.

Just use target_link_libraries

Look at this example line in your CMakeLists.txt

set(LIB_DIR ${PROJECT_SOURCE_DIR}/lib)
set(MY_LIBS ${LIB_DIR}/libMINTERFACE.so.0)

target_link_libraries(your_node
    ${catkin_LIBRARIES} 
    ${MY_LIBS}
)
#target_link_libraries(MCORE /home/jros/roskinectueye/kinectueye/lib)

This assumes that Modify it to your libs are located in a directory called 'lib' inside your package.needs and you should be fine.

Edit2:

This answer does not solve this question. After providing more information it revealed that the questioner uses rosbuild.