Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Undefined symbol with plugin

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,, I get the following error:

gzserver: symbol lookup error: /home/plugins/build/ 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, and defined in the

I've added join() to the scope of 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)

add_library(PlankDrop SHARED
add_library(CamRecord SHARED
add_library(ExtraFunctions SHARED extra_functions.h)

target_link_libraries(PlankDrop CamRecord ExtraFunctions ${GAZEBO_LIBRARIES})

The relevant parts of my source code is here. All of my solutions just introduce new issues that are equally confusing.