diff --git a/CMakeLists.txt b/CMakeLists.txt index ac957230b7..27023d35af 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -235,7 +235,8 @@ set(GZ_SIM_GUI_PLUGIN_INSTALL_DIR #============================================================================ # Configure the build #============================================================================ -gz_configure_build(QUIT_IF_BUILD_ERRORS) +gz_configure_build(QUIT_IF_BUILD_ERRORS + HIDE_SYMBOLS_BY_DEFAULT) add_subdirectory(examples) diff --git a/src/gui/plugins/joint_position_controller/JointPositionController.hh b/src/gui/plugins/joint_position_controller/JointPositionController.hh index 0e23ca4bc9..172f893f65 100644 --- a/src/gui/plugins/joint_position_controller/JointPositionController.hh +++ b/src/gui/plugins/joint_position_controller/JointPositionController.hh @@ -25,6 +25,17 @@ #include #include +#ifndef _WIN32 +# define JointPositionController_EXPORTS_API \ + __attribute__ ((visibility ("default"))) +#else +# if (defined(JointPositionController_EXPORTS)) +# define JointPositionController_EXPORTS_API __declspec(dllexport) +# else +# define JointPositionController_EXPORTS_API __declspec(dllimport) +# endif +#endif + Q_DECLARE_METATYPE(gz::sim::Entity) namespace gz @@ -36,7 +47,8 @@ namespace gui class JointPositionControllerPrivate; /// \brief Model holding information about joints - class JointsModel : public QStandardItemModel + class JointPositionController_EXPORTS_API JointsModel : + public QStandardItemModel { Q_OBJECT @@ -88,7 +100,8 @@ namespace gui /// ``: Load the widget pointed at the given model, so it's not /// necessary to select it. If a model is given at startup, the plugin starts /// in locked mode. - class JointPositionController : public sim::GuiSystem + class JointPositionController_EXPORTS_API JointPositionController : + public sim::GuiSystem { Q_OBJECT diff --git a/src/gui/plugins/plot_3d/Plot3D.hh b/src/gui/plugins/plot_3d/Plot3D.hh index d3d7836e5a..180f68a785 100644 --- a/src/gui/plugins/plot_3d/Plot3D.hh +++ b/src/gui/plugins/plot_3d/Plot3D.hh @@ -24,6 +24,16 @@ #include "gz/gui/qt.h" +#ifndef _WIN32 +# define Plot3D_EXPORTS_API __attribute__ ((visibility ("default"))) +#else +# if (defined(Plot3D_EXPORTS)) +# define Plot3D_EXPORTS_API __declspec(dllexport) +# else +# define Plot3D_EXPORTS_API __declspec(dllimport) +# endif +#endif + namespace gz { namespace sim @@ -59,7 +69,7 @@ namespace gui /// After this number is reached, the older points start being deleted. /// Defaults to 1000. /// - class Plot3D : public gz::sim::GuiSystem + class Plot3D_EXPORTS_API Plot3D : public gz::sim::GuiSystem { Q_OBJECT