Getting error in pluginlib when trying to use my own .so file

asked 2018-08-01 02:12:14 -0500

gal forer gravatar image

updated 2018-08-01 02:22:52 -0500

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

edit retag flag offensive close merge delete

Comments

1

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.

gvdhoorn gravatar image gvdhoorn  ( 2018-08-01 02:16:49 -0500 )edit

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.

gvdhoorn gravatar image gvdhoorn  ( 2018-08-01 02:17:40 -0500 )edit

Yes I'm sorry

gal forer gravatar image gal forer  ( 2018-08-01 02:23:52 -0500 )edit