diff --git a/SDL2pp/AudioDevice.hh b/SDL2pp/AudioDevice.hh index 61c44fa..a224078 100644 --- a/SDL2pp/AudioDevice.hh +++ b/SDL2pp/AudioDevice.hh @@ -30,6 +30,7 @@ #include #include +#include namespace SDL2pp { @@ -46,7 +47,7 @@ class AudioSpec; /// audio functionality. /// //////////////////////////////////////////////////////////// -class AudioDevice { +class SDL2PP_EXPORT AudioDevice { public: //////////////////////////////////////////////////////////// /// \brief SDL2pp::AudioDevice lock @@ -82,7 +83,7 @@ public: /// \endcode /// //////////////////////////////////////////////////////////// - class LockHandle { + class SDL2PP_EXPORT LockHandle { friend class AudioDevice; private: AudioDevice* device_; ///< SDL2pp::AudioDevice the lock belongs to diff --git a/SDL2pp/AudioSpec.hh b/SDL2pp/AudioSpec.hh index c719e80..ef1ab5d 100644 --- a/SDL2pp/AudioSpec.hh +++ b/SDL2pp/AudioSpec.hh @@ -24,6 +24,8 @@ #include +#include + namespace SDL2pp { //////////////////////////////////////////////////////////// @@ -41,7 +43,7 @@ namespace SDL2pp { /// \see http://wiki.libsdl.org/SDL_AudioSpec /// //////////////////////////////////////////////////////////// -class AudioSpec : public SDL_AudioSpec { +class SDL2PP_EXPORT AudioSpec : public SDL_AudioSpec { public: //////////////////////////////////////////////////////////// /// \brief Create empty (invalid) audio format specification diff --git a/SDL2pp/Chunk.hh b/SDL2pp/Chunk.hh index b8a9f7b..bed45fb 100644 --- a/SDL2pp/Chunk.hh +++ b/SDL2pp/Chunk.hh @@ -26,6 +26,8 @@ #include +#include + namespace SDL2pp { class RWops; @@ -38,7 +40,7 @@ class RWops; /// \headerfile SDL2pp/Chunk.hh /// //////////////////////////////////////////////////////////// -class Chunk { +class SDL2PP_EXPORT Chunk { private: Mix_Chunk* chunk_; ///< Managed Mix_Chunk object diff --git a/SDL2pp/Exception.hh b/SDL2pp/Exception.hh index 356e109..fe6b73c 100644 --- a/SDL2pp/Exception.hh +++ b/SDL2pp/Exception.hh @@ -25,6 +25,8 @@ #include #include +#include + namespace SDL2pp { //////////////////////////////////////////////////////////// @@ -66,7 +68,7 @@ namespace SDL2pp { /// \endcode /// //////////////////////////////////////////////////////////// -class Exception : public std::runtime_error { +class SDL2PP_EXPORT Exception : public std::runtime_error { private: std::string sdl_function_; ///< SDL function which caused an error std::string sdl_error_; ///< SDL error string diff --git a/SDL2pp/Font.hh b/SDL2pp/Font.hh index ef0aa99..32abb8f 100644 --- a/SDL2pp/Font.hh +++ b/SDL2pp/Font.hh @@ -29,6 +29,7 @@ #include #include #include +#include namespace SDL2pp { @@ -44,7 +45,7 @@ class RWops; /// \see https://www.libsdl.org/projects/SDL_ttf/docs/SDL_ttf.html#SEC56 /// //////////////////////////////////////////////////////////// -class Font { +class SDL2PP_EXPORT Font { private: TTF_Font* font_; ///< Managed TTF_Font object diff --git a/SDL2pp/Mixer.hh b/SDL2pp/Mixer.hh index 23dc96d..b1609c6 100644 --- a/SDL2pp/Mixer.hh +++ b/SDL2pp/Mixer.hh @@ -26,9 +26,10 @@ #include #include - #include +#include + namespace SDL2pp { class Chunk; @@ -46,7 +47,7 @@ class Music; /// SDL2pp:Chunk's. /// //////////////////////////////////////////////////////////// -class Mixer { +class SDL2PP_EXPORT Mixer { public: typedef void (*ChannelFinishedHandler)(int); ///< Function type for channel finished callback typedef void (*MusicFinishedHandler)(); ///< Function type for music finished callback diff --git a/SDL2pp/Music.hh b/SDL2pp/Music.hh index 0740ba7..3a1a7b5 100644 --- a/SDL2pp/Music.hh +++ b/SDL2pp/Music.hh @@ -26,6 +26,8 @@ #include +#include + namespace SDL2pp { //////////////////////////////////////////////////////////// @@ -36,7 +38,7 @@ namespace SDL2pp { /// \headerfile SDL2pp/Music.hh /// //////////////////////////////////////////////////////////// -class Music { +class SDL2PP_EXPORT Music { private: Mix_Music* music_; ///< Managed Mix_Music object diff --git a/SDL2pp/Point.hh b/SDL2pp/Point.hh index de188b6..3d7bffb 100644 --- a/SDL2pp/Point.hh +++ b/SDL2pp/Point.hh @@ -27,6 +27,8 @@ #include +#include + namespace SDL2pp { class Rect; @@ -46,7 +48,7 @@ class Rect; /// \see http://wiki.libsdl.org/SDL_Point /// //////////////////////////////////////////////////////////// -class Point : public SDL_Point { +class SDL2PP_EXPORT Point : public SDL_Point { public: //////////////////////////////////////////////////////////// /// \brief Default constructor @@ -459,7 +461,7 @@ constexpr bool operator!=(const SDL2pp::Point& a, const SDL2pp::Point& b) { /// \returns True if a < b /// //////////////////////////////////////////////////////////// -bool operator<(const SDL2pp::Point& a, const SDL2pp::Point& b); +SDL2PP_EXPORT bool operator<(const SDL2pp::Point& a, const SDL2pp::Point& b); //////////////////////////////////////////////////////////// /// \brief Stream output operator overload for SDL2pp::Point @@ -470,7 +472,7 @@ bool operator<(const SDL2pp::Point& a, const SDL2pp::Point& b); /// \returns stream /// //////////////////////////////////////////////////////////// -std::ostream& operator<<(std::ostream& stream, const SDL2pp::Point& point); +SDL2PP_EXPORT std::ostream& operator<<(std::ostream& stream, const SDL2pp::Point& point); namespace std { diff --git a/SDL2pp/RWops.hh b/SDL2pp/RWops.hh index 6fc9b98..4b8c3e2 100644 --- a/SDL2pp/RWops.hh +++ b/SDL2pp/RWops.hh @@ -26,6 +26,7 @@ #include #include +#include namespace SDL2pp { @@ -44,7 +45,7 @@ namespace SDL2pp { /// \see SDL2pp::ContainerRWops, SDL2pp::StreamRWops /// //////////////////////////////////////////////////////////// -class CustomRWops { +class SDL2PP_EXPORT CustomRWops { public: //////////////////////////////////////////////////////////// /// \brief Destructor @@ -142,7 +143,7 @@ public: /// make it possible to write pure C++ %RWops classes, in a safe way. /// //////////////////////////////////////////////////////////// -class RWops { +class SDL2PP_EXPORT RWops { protected: SDL_RWops* rwops_; ///< Managed SDL_RWops object diff --git a/SDL2pp/Rect.hh b/SDL2pp/Rect.hh index 39bb54f..90f949f 100644 --- a/SDL2pp/Rect.hh +++ b/SDL2pp/Rect.hh @@ -28,6 +28,7 @@ #include #include +#include namespace SDL2pp { @@ -46,7 +47,7 @@ namespace SDL2pp { /// \see http://wiki.libsdl.org/SDL_Rect /// //////////////////////////////////////////////////////////// -class Rect : public SDL_Rect { +class SDL2PP_EXPORT Rect : public SDL_Rect { public: //////////////////////////////////////////////////////////// /// \brief Default constructor @@ -620,7 +621,7 @@ constexpr bool operator!=(const SDL2pp::Rect& a, const SDL2pp::Rect& b) { /// \returns True if a < b /// //////////////////////////////////////////////////////////// -bool operator<(const SDL2pp::Rect& a, const SDL2pp::Rect& b); +SDL2PP_EXPORT bool operator<(const SDL2pp::Rect& a, const SDL2pp::Rect& b); //////////////////////////////////////////////////////////// /// \brief Stream output operator overload for SDL2pp::Rect @@ -631,7 +632,7 @@ bool operator<(const SDL2pp::Rect& a, const SDL2pp::Rect& b); /// \returns stream /// //////////////////////////////////////////////////////////// -std::ostream& operator<<(std::ostream& stream, const SDL2pp::Rect& rect); +SDL2PP_EXPORT std::ostream& operator<<(std::ostream& stream, const SDL2pp::Rect& rect); namespace std { diff --git a/SDL2pp/Renderer.hh b/SDL2pp/Renderer.hh index 665d0fc..4635bfc 100644 --- a/SDL2pp/Renderer.hh +++ b/SDL2pp/Renderer.hh @@ -29,6 +29,7 @@ #include #include #include +#include struct SDL_RendererInfo; struct SDL_Renderer; @@ -47,7 +48,7 @@ class Point; /// \headerfile SDL2pp/Renderer.hh /// //////////////////////////////////////////////////////////// -class Renderer { +class SDL2PP_EXPORT Renderer { private: SDL_Renderer* renderer_; ///< Managed SDL_Renderer object diff --git a/SDL2pp/SDL.hh b/SDL2pp/SDL.hh index 9043d70..df95549 100644 --- a/SDL2pp/SDL.hh +++ b/SDL2pp/SDL.hh @@ -24,6 +24,8 @@ #include +#include + namespace SDL2pp { //////////////////////////////////////////////////////////// @@ -54,7 +56,7 @@ namespace SDL2pp { /// \endcode /// //////////////////////////////////////////////////////////// -class SDL { +class SDL2PP_EXPORT SDL { public: //////////////////////////////////////////////////////////// /// \brief Initializes SDL2 library diff --git a/SDL2pp/SDLImage.hh b/SDL2pp/SDLImage.hh index 264e4d7..9e645a1 100644 --- a/SDL2pp/SDLImage.hh +++ b/SDL2pp/SDLImage.hh @@ -22,6 +22,8 @@ #ifndef SDL2PP_SDLIMAGE_HH #define SDL2PP_SDLIMAGE_HH +#include + namespace SDL2pp { //////////////////////////////////////////////////////////// @@ -53,7 +55,7 @@ namespace SDL2pp { /// \endcode /// //////////////////////////////////////////////////////////// -class SDLImage { +class SDL2PP_EXPORT SDLImage { public: //////////////////////////////////////////////////////////// /// \brief Initializes SDL_image library diff --git a/SDL2pp/SDLMixer.hh b/SDL2pp/SDLMixer.hh index e33a26c..9b45134 100644 --- a/SDL2pp/SDLMixer.hh +++ b/SDL2pp/SDLMixer.hh @@ -22,6 +22,8 @@ #ifndef SDL2PP_SDLMIXER_HH #define SDL2PP_SDLMIXER_HH +#include + namespace SDL2pp { //////////////////////////////////////////////////////////// @@ -44,7 +46,7 @@ namespace SDL2pp { /// \endcode /// //////////////////////////////////////////////////////////// -class SDLMixer { +class SDL2PP_EXPORT SDLMixer { public: //////////////////////////////////////////////////////////// /// \brief Initializes SDL_mixer library diff --git a/SDL2pp/SDLTTF.hh b/SDL2pp/SDLTTF.hh index e8a4c9f..3c75fff 100644 --- a/SDL2pp/SDLTTF.hh +++ b/SDL2pp/SDLTTF.hh @@ -22,6 +22,8 @@ #ifndef SDL2PP_SDLTTF_HH #define SDL2PP_SDLTTF_HH +#include + namespace SDL2pp { //////////////////////////////////////////////////////////// @@ -51,7 +53,7 @@ namespace SDL2pp { /// \endcode /// //////////////////////////////////////////////////////////// -class SDLTTF { +class SDL2PP_EXPORT SDLTTF { public: //////////////////////////////////////////////////////////// /// \brief Initializes SDL_ttf library diff --git a/SDL2pp/Surface.hh b/SDL2pp/Surface.hh index d932c2d..4eb1620 100644 --- a/SDL2pp/Surface.hh +++ b/SDL2pp/Surface.hh @@ -29,6 +29,7 @@ #include #include #include +#include struct SDL_Surface; struct SDL_PixelFormat; @@ -48,7 +49,7 @@ class RWops; /// \see http://wiki.libsdl.org/SDL_Surface /// //////////////////////////////////////////////////////////// -class Surface { +class SDL2PP_EXPORT Surface { private: SDL_Surface* surface_; ///< Managed SDL_Surface object diff --git a/SDL2pp/Texture.hh b/SDL2pp/Texture.hh index b481a22..b886815 100644 --- a/SDL2pp/Texture.hh +++ b/SDL2pp/Texture.hh @@ -30,6 +30,7 @@ #include #include #include +#include struct SDL_Texture; @@ -48,7 +49,7 @@ class Surface; /// \headerfile SDL2pp/Texture.hh /// //////////////////////////////////////////////////////////// -class Texture { +class SDL2PP_EXPORT Texture { private: SDL_Texture* texture_; ///< Managed SDL_Texture object diff --git a/SDL2pp/Wav.hh b/SDL2pp/Wav.hh index afe0432..1ec79f5 100644 --- a/SDL2pp/Wav.hh +++ b/SDL2pp/Wav.hh @@ -25,6 +25,7 @@ #include #include +#include namespace SDL2pp { @@ -48,7 +49,7 @@ class RWops; /// See audio_wav demo for an example. /// //////////////////////////////////////////////////////////// -class Wav { +class SDL2PP_EXPORT Wav { private: Uint8* audio_buffer_; ///< Raw audio data Uint32 audio_length_; ///< Raw audio data length in bytes diff --git a/SDL2pp/Window.hh b/SDL2pp/Window.hh index a9903c8..e2bf4e1 100644 --- a/SDL2pp/Window.hh +++ b/SDL2pp/Window.hh @@ -28,6 +28,7 @@ #include #include +#include struct SDL_Window; @@ -62,7 +63,7 @@ class Surface; /// \endcode /// //////////////////////////////////////////////////////////// -class Window { +class SDL2PP_EXPORT Window { private: SDL_Window* window_; ///< Managed SDL2_Window object