Getting error in pluginlib when trying to use my own .so file
hi, I get the error "symbol lookup error: /home/gal/catkin_ws/devel/lib//libpolygon_plugins.so: undefined symbol: _Z9getTemp11v" at run time after the code compiles successfully when I used the same library in a regular node I had no problem.
this is the CMakeLists.txt:
cmake_minimum_required(VERSION 2.8.3)
project(pluginlib_tutorials_)
find_package(catkin REQUIRED COMPONENTS
pluginlib
roscpp
)
catkin_package(
# INCLUDE_DIRS include
# LIBRARIES pluginlib_tutorials_
CATKIN_DEPENDS pluginlib roscpp
# DEPENDS system_lib
)
###########
## Build ##
###########
## Specify additional locations of header files
## Your package locations should be listed before other locations
include_directories(
# include
${catkin_INCLUDE_DIRS}
)
#############
## Install ##
#############
include_directories(include)
add_library(polygon_plugins src/polygon_plugins.cpp)
add_executable(polygon_loader src/polygon_loader.cpp)
FIND_LIBRARY(TEMP_LIBRARY bladetemp /lib/)
target_link_libraries(polygon_loader ${catkin_LIBRARIES} ${TEMP_LIBRARY})
I'm using Ubuntu 16.04 with Ros Kinetic
Could I ask you to please take care of formatting your question properly next time? Use the Preformatted Text button (the one with
101010
on it) to format things like console copy-pastes, code and build scripts.Thanks.
Also: could you please remove all the comments from the
CMakeLists.txt
you show? About 90% of the lines shown is commented and can be removed.Thanks.
Yes I'm sorry