Skip to content

Commit

Permalink
Enable HIDE_SYMBOLS_BY_DEFAULT + linux patches (#2248)
Browse files Browse the repository at this point in the history
* Added missing visible attributes
* Enable HIDE_SYMBOLS_BY_DEFAULT
---------

Signed-off-by: Jose Luis Rivero <[email protected]>
  • Loading branch information
j-rivero authored Dec 18, 2023
1 parent 9f21c6e commit 451dcf3
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 4 deletions.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,17 @@
#include <gz/sim/gui/GuiSystem.hh>
#include <gz/sim/Types.hh>

#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
Expand All @@ -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

Expand Down Expand Up @@ -88,7 +100,8 @@ namespace gui
/// `<model_name>`: 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

Expand Down
12 changes: 11 additions & 1 deletion src/gui/plugins/plot_3d/Plot3D.hh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 451dcf3

Please sign in to comment.