Undefined symbols after updating from 1.14.20 / const char* slots not accepted anymore
Closed this issue · 2 comments
After updating from 1.14.20 to 1.14.23 version, there is an interface incompatibility. It seem about rviz::EditableEnumProperty. could it be rollback?
[ERROR] [1715910267.480759600]: PluginlibFactory: The plugin for class 'rviz_plugin/ObjectArray' failed to load. Error: Failed to load library /home/rviz_plugin/lib/librviz_plugin.so. Make sure that you are calling the PLUGINLIB_EXPORT_CLASS macro in the library code, and that names are consistent between this macro and your XML. Error string: Could not load library (Poco exception = /home/rviz_plugin/lib//librviz_plugin.so: undefined symbol: _ZN4rviz20EditableEnumPropertyC1ERK7QStringS3_S3_PNS_8PropertyEPKcP7QObject)
Your environment
- OS Version: e.g. Ubuntu 20.04
- ROS Distro: [Noetic]
- RViz, Qt, OGRE, OpenGl version as printed by rviz:
The missing symbol corresponds to the following constructor:
rviz/src/rviz/properties/editable_enum_property.h
Lines 47 to 52 in fd566b9
The Qt4-style signals have been replaced with modern Qt5-style signals. The constructor now looks as follows:
rviz/src/rviz/properties/editable_enum_property.h
Lines 52 to 58 in 2db2c53
You need to adapt the construction and pass your change_slot
as a method pointer instead of a string:
EditableEnumProperty("name", "default", "description", parent, &MyClass::changed_slot, receiver);
Actually, it should suffice to recompile your plugin. I designed the new API to be backward-compatible. However, it is not ABI-compatible. So a recompile is required.