From 6f4968e28101e75a121b3e3f45d45c1c90d82801 Mon Sep 17 00:00:00 2001 From: Guillermo Rodriguez Garcia Date: Mon, 10 Jan 2000 00:55:05 +0000 Subject: [PATCH] Fixes from Mumit Khan to allow DLL compilation; most fixes related to missing WXDLLEXPORTs git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5319 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/dataobj.h | 2 +- include/wx/defs.h | 16 ++++++++++++++++ include/wx/font.h | 2 +- include/wx/generic/grid.h | 4 ++-- include/wx/mstream.h | 4 ++-- include/wx/msw/tooltip.h | 2 +- 6 files changed, 23 insertions(+), 7 deletions(-) diff --git a/include/wx/dataobj.h b/include/wx/dataobj.h index 5d80b6f16e..08171926b8 100644 --- a/include/wx/dataobj.h +++ b/include/wx/dataobj.h @@ -87,7 +87,7 @@ public: // the value for default argument to some functions (corresponds to // wxDF_INVALID) -extern const wxDataFormat& wxFormatInvalid; +extern WXDLLEXPORT const wxDataFormat& wxFormatInvalid; // ---------------------------------------------------------------------------- // wxDataObject represents a piece of data which knows which formats it diff --git a/include/wx/defs.h b/include/wx/defs.h index 9ac82a237a..7adcc6ae05 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -378,6 +378,22 @@ typedef int wxWindowID; # define WXDLLEXPORT_CTORFN # endif +#elif defined(__GNUC__) + +# ifdef WXMAKINGDLL +# define WXDLLEXPORT __declspec( dllexport ) +# define WXDLLEXPORT_DATA(type) __declspec( dllexport ) type +# define WXDLLEXPORT_CTORFN +# elif defined(WXUSINGDLL) +# define WXDLLEXPORT __declspec( dllimport ) +# define WXDLLEXPORT_DATA(type) __declspec( dllimport ) type +# define WXDLLEXPORT_CTORFN +# else +# define WXDLLEXPORT +# define WXDLLEXPORT_DATA(type) type +# define WXDLLEXPORT_CTORFN +# endif + #elif defined(__WXPM__) # ifdef WXMAKINGDLL diff --git a/include/wx/font.h b/include/wx/font.h index 3860ec3d54..6b1737db51 100644 --- a/include/wx/font.h +++ b/include/wx/font.h @@ -128,7 +128,7 @@ enum wxFontEncoding class WXDLLEXPORT wxFontRefData; -class wxFontBase : public wxGDIObject +class WXDLLEXPORT wxFontBase : public wxGDIObject { public: // creator function diff --git a/include/wx/generic/grid.h b/include/wx/generic/grid.h index 4ab8ec061e..23bef5c25a 100644 --- a/include/wx/generic/grid.h +++ b/include/wx/generic/grid.h @@ -52,7 +52,7 @@ #define WXGRID_DEFAULT_TOPEDIT_HEIGHT 60 -class wxGrid; +class WXDLLEXPORT wxGrid; ////////////////////////////////////////////////////////////////////// @@ -283,7 +283,7 @@ class wxGridTextCtrl : public wxTextCtrl }; -class wxGrid : public wxPanel +class WXDLLEXPORT wxGrid : public wxPanel { DECLARE_DYNAMIC_CLASS( wxGrid ) diff --git a/include/wx/mstream.h b/include/wx/mstream.h index 7a71e8059a..85e0b30e35 100644 --- a/include/wx/mstream.h +++ b/include/wx/mstream.h @@ -15,7 +15,7 @@ #if wxUSE_STREAMS -class wxMemoryInputStream: public wxInputStream { +class WXDLLEXPORT wxMemoryInputStream: public wxInputStream { private: size_t m_length; @@ -37,7 +37,7 @@ class wxMemoryInputStream: public wxInputStream { off_t OnSysTell() const; }; -class wxMemoryOutputStream: public wxOutputStream { +class WXDLLEXPORT wxMemoryOutputStream: public wxOutputStream { public: wxMemoryOutputStream(char *data = NULL, size_t length = 0); virtual ~wxMemoryOutputStream(); diff --git a/include/wx/msw/tooltip.h b/include/wx/msw/tooltip.h index 135e87116e..7c637340c2 100644 --- a/include/wx/msw/tooltip.h +++ b/include/wx/msw/tooltip.h @@ -9,7 +9,7 @@ // Licence: wxWindows license /////////////////////////////////////////////////////////////////////////////// -class wxToolTip : public wxObject +class WXDLLEXPORT wxToolTip : public wxObject { public: // ctor & dtor -- 2.45.2