Quantcast
Channel: Gazebo: Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 7017

Undefined symbol with plugin

$
0
0
I've been stuck on this issue for an embarrassingly long period of time, and would be very grateful for any help. I'm very new to c++ and CMake, so it's likely I'm overlooking something quite obvious. When I run Gazebo with a plugin I wrote, plank_drop.cc, I get the following error: gzserver: symbol lookup error: /home/plugins/build/libPlankDrop.so: undefined symbol: _Z4joinIdENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_4listIT_SaIS7_EEES5_ The symbol's name leads me to believe the issue is in the join function, called within plank_drop.cc, and defined in the extra_functions.cc. I've added join() to the scope of plank_drop.cc like so: #include "extra_functions.h" And the compiler doesn't complain. It never seems to compain at compile time, or link time. It only fails at runtime. I've set this up in my CMakeList.txt like this: cmake_minimum_required(VERSION 2.8 FATAL_ERROR) find_package(gazebo REQUIRED) include_directories(${GAZEBO_INCLUDE_DIRS}) link_directories(${GAZEBO_LIBRARY_DIRS}) list(APPEND CMAKE_CXX_FLAGS "${GAZEBO_CXX_FLAGS}") add_library(PlankDrop SHARED plank_drop.cc) add_library(CamRecord SHARED cam_record.cc) add_library(ExtraFunctions SHARED extra_functions.cc extra_functions.h) target_link_libraries(PlankDrop CamRecord ExtraFunctions ${GAZEBO_LIBRARIES}) The relevant parts of my [source code is here](https://gitlab.com/daviddaish/pose-pipeline/tree/b226266e24f32e85fa8f58b8697ba31b2f930d28/include/plugins). All of my solutions just introduce new issues that are equally confusing.

Viewing all articles
Browse latest Browse all 7017

Trending Articles