Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Windows][melodic] add missing DLL exports. #1325

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion src/rviz/default_plugin/interactive_markers/interactive_marker.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,18 @@
#ifndef RVIZ_INTERACTIVE_MARKER_H_
#define RVIZ_INTERACTIVE_MARKER_H_

// Import/export for windows dll's and visibility for gcc shared libraries.

#ifdef ROS_BUILD_SHARED_LIBS // ros is being built around shared libraries
#ifdef rviz_default_plugin_EXPORTS // we are building a shared lib/dll
#define RVIZ_DEFAULT_PLUGIN_DECL ROS_HELPER_EXPORT
#else // we are using shared lib/dll
#define RVIZ_DEFAULT_PLUGIN_DECL ROS_HELPER_IMPORT
#endif
#else // ros is being built around static libraries
#define RVIZ_DEFAULT_PLUGIN_DECL
#endif

#ifndef Q_MOC_RUN
#include <boost/shared_ptr.hpp>
#include <boost/thread/mutex.hpp>
Expand Down Expand Up @@ -64,7 +76,7 @@ namespace rviz
class DisplayContext;
class InteractiveMarkerDisplay;

class InteractiveMarker : public QObject
class RVIZ_DEFAULT_PLUGIN_DECL InteractiveMarker : public QObject
{
Q_OBJECT
public:
Expand Down
3 changes: 2 additions & 1 deletion src/rviz/display.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@

#include "rviz/properties/status_property.h"
#include "rviz/properties/bool_property.h"
#include "rviz/rviz_macros.h"

#include <QIcon>
#include <QSet>
Expand All @@ -60,7 +61,7 @@ class StatusList;
class DisplayContext;
class PanelDockWidget;

class Display: public BoolProperty
class RVIZ_DECL Display: public BoolProperty
{
Q_OBJECT
public:
Expand Down
3 changes: 2 additions & 1 deletion src/rviz/display_group.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#define DISPLAY_GROUP_H

#include "display.h"
#include "rviz/rviz_macros.h"

namespace rviz
{
Expand All @@ -44,7 +45,7 @@ class DisplayFactory;
* Property superclass stores the non-Display properties and this
* class stores the Display objects in a separate list. The
* separation is enforced in addChild(). */
class DisplayGroup: public Display
class RVIZ_DECL DisplayGroup: public Display
{
Q_OBJECT
public:
Expand Down
3 changes: 2 additions & 1 deletion src/rviz/frame_position_tracking_view_controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include <OgreVector3.h>

#include "rviz/view_controller.h"
#include "rviz/rviz_macros.h"

namespace rviz
{
Expand All @@ -42,7 +43,7 @@ class TfFrameProperty;

/** @brief Base class of ViewControllers which have a "Target Frame"
* which is a TF frame whose position they track. */
class FramePositionTrackingViewController: public ViewController
class RVIZ_DECL FramePositionTrackingViewController: public ViewController
{
Q_OBJECT
public:
Expand Down
3 changes: 2 additions & 1 deletion src/rviz/image/image_display_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
# include "rviz/properties/int_property.h"

# include "rviz/display.h"
# include "rviz/rviz_macros.h"
#endif

namespace rviz
Expand All @@ -57,7 +58,7 @@ namespace rviz
* it handles subscribing and unsubscribing when the display is
* enabled or disabled. */

class ImageDisplayBase : public Display
class RVIZ_DECL ImageDisplayBase : public Display
{
Q_OBJECT
public:
Expand Down
3 changes: 2 additions & 1 deletion src/rviz/message_filter_display.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,15 @@
#include "rviz/properties/ros_topic_property.h"

#include "rviz/display.h"
#include "rviz/rviz_macros.h"

namespace rviz
{

/** @brief Helper superclass for MessageFilterDisplay, needed because
* Qt's moc and c++ templates don't work nicely together. Not
* intended to be used directly. */
class _RosTopicDisplay: public Display
class RVIZ_DECL _RosTopicDisplay: public Display
{
Q_OBJECT
public:
Expand Down
3 changes: 2 additions & 1 deletion src/rviz/ogre_helpers/axes.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#define OGRE_TOOLS_AXES_H

#include "object.h"
#include "rviz/rviz_macros.h"

#include <stddef.h>
#include <stdint.h>
Expand All @@ -55,7 +56,7 @@ class Shape;
* \class Axes
* \brief An object that displays a set of X/Y/Z axes, with X=Red, Y=Green, Z=Blue
*/
class Axes : public Object
class RVIZ_DECL Axes : public Object
{
public:
/**
Expand Down
4 changes: 3 additions & 1 deletion src/rviz/ogre_helpers/object.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
#ifndef OGRE_TOOLS_OBJECT_H
#define OGRE_TOOLS_OBJECT_H

#include "rviz/rviz_macros.h"

namespace Ogre
{
class SceneManager;
Expand All @@ -46,7 +48,7 @@ namespace rviz
* \class Object
* \brief Base class for visible objects, providing a minimal generic interface.
*/
class Object
class RVIZ_DECL Object
{
public:
/**
Expand Down
4 changes: 3 additions & 1 deletion src/rviz/ogre_helpers/render_system.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
#include <OgreRoot.h>
#include <stdint.h>

#include "rviz/rviz_macros.h"

#ifndef _WIN32
# pragma GCC diagnostic pop
#endif
Expand All @@ -52,7 +54,7 @@ namespace Ogre
namespace rviz
{

class RenderSystem
class RVIZ_DECL RenderSystem
{
public:

Expand Down
3 changes: 2 additions & 1 deletion src/rviz/panel.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,14 @@
#include <QWidget>

#include "rviz/config.h"
#include "rviz/rviz_macros.h"

namespace rviz
{

class VisualizationManager;

class Panel: public QWidget
class RVIZ_DECL Panel: public QWidget
{
Q_OBJECT
public:
Expand Down
3 changes: 2 additions & 1 deletion src/rviz/panel_dock_widget.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#define RVIZ_PANEL_DOCK_WIDGET_H

#include "rviz/config.h"
#include "rviz/rviz_macros.h"

#include <QDockWidget>
#include <QLabel>
Expand All @@ -43,7 +44,7 @@ namespace rviz
* Use setContentWidget() instead of QDockWidget::setWidget() if you
* want the PanelDockWidget to be destroyed when the content widget is
* destroyed. */
class PanelDockWidget: public QDockWidget
class RVIZ_DECL PanelDockWidget: public QDockWidget
{
Q_OBJECT
public:
Expand Down
3 changes: 2 additions & 1 deletion src/rviz/properties/bool_property.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,13 @@
#define BOOL_PROPERTY_H

#include "rviz/properties/property.h"
#include "rviz/rviz_macros.h"

namespace rviz
{

/** @brief Property specialized to provide getter for booleans. */
class BoolProperty: public Property
class RVIZ_DECL BoolProperty: public Property
{
Q_OBJECT
public:
Expand Down
3 changes: 2 additions & 1 deletion src/rviz/properties/property.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#include <QVariant>

#include "rviz/config.h"
#include "rviz/rviz_macros.h"

class QModelIndex;
class QPainter;
Expand Down Expand Up @@ -97,7 +98,7 @@ class PropertyTreeModel;
* To show a Property tree in a PropertyTreeWidget, wrap the root
* Property in a PropertyTreeModel and call
* PropertyTreeWidget::setModel() with it. */
class Property: public QObject
class RVIZ_DECL Property: public QObject
{
Q_OBJECT
public:
Expand Down
3 changes: 2 additions & 1 deletion src/rviz/properties/property_tree_widget.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,15 @@

#include "rviz/config.h"
#include "rviz/properties/property_tree_model.h"
#include "rviz/rviz_macros.h"

namespace rviz
{

class Property;
class SplitterHandle;

class PropertyTreeWidget: public QTreeView
class RVIZ_DECL PropertyTreeWidget: public QTreeView
{
Q_OBJECT
public:
Expand Down
3 changes: 2 additions & 1 deletion src/rviz/properties/ros_topic_property.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,12 @@
#include <string>

#include "rviz/properties/editable_enum_property.h"
#include "rviz/rviz_macros.h"

namespace rviz
{

class RosTopicProperty: public EditableEnumProperty
class RVIZ_DECL RosTopicProperty: public EditableEnumProperty
{
Q_OBJECT
public:
Expand Down
3 changes: 2 additions & 1 deletion src/rviz/properties/tf_frame_property.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,14 @@
#include <string>

#include "rviz/properties/editable_enum_property.h"
#include "rviz/rviz_macros.h"

namespace rviz
{

class FrameManager;

class TfFrameProperty: public EditableEnumProperty
class RVIZ_DECL TfFrameProperty: public EditableEnumProperty
{
Q_OBJECT
public:
Expand Down
3 changes: 2 additions & 1 deletion src/rviz/properties/vector_property.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,12 @@
#include <OgreVector3.h>

#include "rviz/properties/property.h"
#include "rviz/rviz_macros.h"

namespace rviz
{

class VectorProperty: public Property
class RVIZ_DECL VectorProperty: public Property
{
Q_OBJECT
public:
Expand Down
45 changes: 45 additions & 0 deletions src/rviz/rviz_macros.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
* Copyright (c) 2019, Open Source Robotics Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the Willow Garage, Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/

#ifndef RVIZ_MACROS_H_
#define RVIZ_MACROS_H_

#include <ros/macros.h>

#ifdef ROS_BUILD_SHARED_LIBS // ros is being built around shared libraries
#ifdef rviz_EXPORTS // we are building a shared lib/dll
#define RVIZ_DECL ROS_HELPER_EXPORT
#else // we are using shared lib/dll
#define RVIZ_DECL ROS_HELPER_IMPORT
#endif
#else // ros is being built around static libraries
#define RVIZ_DECL
#endif

#endif
3 changes: 2 additions & 1 deletion src/rviz/selection/selection_handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
#include "rviz/selection/selection_handler.h"
#include "rviz/viewport_mouse_event.h"
#include "rviz/interactive_object.h"
#include "rviz/rviz_macros.h"

namespace Ogre
{
Expand All @@ -61,7 +62,7 @@ class ViewportMouseEvent;

typedef std::vector<Ogre::AxisAlignedBox> V_AABB;

class SelectionHandler
class RVIZ_DECL SelectionHandler
{
public:
SelectionHandler( DisplayContext* context );
Expand Down
3 changes: 2 additions & 1 deletion src/rviz/selection/selection_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@

#include "forwards.h"
#include "selection_handler.h"
#include "rviz/rviz_macros.h"

#ifndef Q_MOC_RUN
#include <boost/shared_ptr.hpp>
Expand Down Expand Up @@ -77,7 +78,7 @@ class PropertyTreeModel;
class ViewportMouseEvent;
class VisualizationManager;

class SelectionManager: public QObject, public Ogre::MaterialManager::Listener, public Ogre::RenderQueueListener
class RVIZ_DECL SelectionManager: public QObject, public Ogre::MaterialManager::Listener, public Ogre::RenderQueueListener
{
Q_OBJECT
public:
Expand Down
3 changes: 2 additions & 1 deletion src/rviz/tool.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#include <QObject>

#include "rviz/config.h"
#include "rviz/rviz_macros.h"

class QMouseEvent;
class QKeyEvent;
Expand All @@ -52,7 +53,7 @@ class Property;
class RenderPanel;
class ViewportMouseEvent;

class Tool : public QObject
class RVIZ_DECL Tool : public QObject
{
Q_OBJECT
public:
Expand Down
Loading