Symbol Lookup Error in Example Plugin
I have compiled the tutorial plugin from http://gazebosim.org/wiki/Tutorials/1.4/plugins/systemguiplugin.
When I run Gazebo with the plugin, I get the following symbol lookup error:
gazebo: symbol lookup error: /<...>/build/libsystem_gui.so: undefined symbol:
_ZN6gazebo3gui17get_active_cameraEv
I am using the CMakeLists.txt from the tutorial linked above. I have removed all other Gazebo installations from my system. I have upgraded to the most recent version of Gazebo for my system: 1.9.2-1~precise.
The same error appears in this question, but I am not using ROS, as this user appears to be.
Any suggestions?
UPDATE: I upgraded to Gazebo 2.1.0-1~precise, and using the updated plugin from examples/plugins/system_gui_plugin
, I no longer get the undefined symbol error (although the plugin doesn't work for other reasons)
However, in the presentation example plugin, after making a few changes to compile the plugin, I still get the following undefined symbol error:
Error [Plugin.hh:141] Failed to load plugin <...>/presentation/build/libpresentation.so:
<...>/presentation/build/libpresentation.so: undefined symbol:
_ZN6gazebo3gui6Events8keyPressE
Commenting out the gui::Events::ConnectKeyPress
line gets rid of the error. gazebo::gui::Events::keyPress
is never accessed explicitly in this plugin.
Key presses are what I'm really after here. This looks to me like something wrong within Gazebo, as compiled, and not in the plugin itself. Am I right about that? Is there anything I can do about it?
P.S. If I have organized my updates to this post in a sub-optimal way, please let me know and I will try to reorganize it. I put things where I thought it made sense to.
Also, for reference, the necessary changes to get the presentation.cc plugin to compile:
- Change the
Load()
function declaration topublic: void Load(int /*_argc*/, char ** /*_argv*/)
- Line 135
rendering::Scene*
becomesrendering::ScenePtr
- Line 144 inputs to
userCam->MoveToPosition
must be reorganized into 2 arguments: a pose and duration.