Each module now has its own export macro, which solves the "unresolved symbol" error with sf::Time::Zero

This commit is contained in:
Laurent Gomila 2012-01-21 10:34:17 +01:00
parent bb7cf47d69
commit 906a62df0f
69 changed files with 450 additions and 180 deletions

View File

@ -102,6 +102,11 @@ macro(sfml_add_library target)
# create the target
add_library(${target} ${THIS_SOURCES})
# define the export symbol of the module
string(REPLACE "-" "_" NAME_UPPER "${target}")
string(TOUPPER "${NAME_UPPER}" NAME_UPPER)
set_target_properties(${target} PROPERTIES DEFINE_SYMBOL ${NAME_UPPER}_EXPORTS)
# adjust the output file prefix/suffix to match our conventions
if(BUILD_SHARED_LIBS)
if(WINDOWS)

View File

@ -0,0 +1,48 @@
////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
// Copyright (C) 2007-2009 Laurent Gomila (laurent.gom@gmail.com)
//
// This software is provided 'as-is', without any express or implied warranty.
// In no event will the authors be held liable for any damages arising from the use of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it freely,
// subject to the following restrictions:
//
// 1. The origin of this software must not be misrepresented;
// you must not claim that you wrote the original software.
// If you use this software in a product, an acknowledgment
// in the product documentation would be appreciated but is not required.
//
// 2. Altered source versions must be plainly marked as such,
// and must not be misrepresented as being the original software.
//
// 3. This notice may not be removed or altered from any source distribution.
//
////////////////////////////////////////////////////////////
#ifndef SFML_AUDIO_EXPORT_HPP
#define SFML_AUDIO_EXPORT_HPP
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.hpp>
////////////////////////////////////////////////////////////
// Define portable import / export macros
////////////////////////////////////////////////////////////
#if defined(SFML_AUDIO_EXPORTS)
#define SFML_AUDIO_API SFML_API_EXPORT
#else
#define SFML_AUDIO_API SFML_API_IMPORT
#endif
#endif // SFML_AUDIO_EXPORT_HPP

View File

@ -28,7 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.hpp>
#include <SFML/Audio/Export.hpp>
#include <SFML/System/Vector3.hpp>
@ -39,7 +39,7 @@ namespace sf
/// from where all the sounds are heard
///
////////////////////////////////////////////////////////////
class SFML_API Listener
class SFML_AUDIO_API Listener
{
public :

View File

@ -28,6 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Audio/Export.hpp>
#include <SFML/Audio/SoundStream.hpp>
#include <SFML/System/Mutex.hpp>
#include <SFML/System/Time.hpp>
@ -48,7 +49,7 @@ class InputStream;
/// \brief Streamed music played from an audio file
///
////////////////////////////////////////////////////////////
class SFML_API Music : public SoundStream
class SFML_AUDIO_API Music : public SoundStream
{
public :

View File

@ -28,6 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Audio/Export.hpp>
#include <SFML/Audio/SoundSource.hpp>
#include <SFML/System/Time.hpp>
#include <cstdlib>
@ -41,7 +42,7 @@ class SoundBuffer;
/// \brief Regular sound that can be played in the audio environment
///
////////////////////////////////////////////////////////////
class SFML_API Sound : public SoundSource
class SFML_AUDIO_API Sound : public SoundSource
{
public :

View File

@ -28,7 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.hpp>
#include <SFML/Audio/Export.hpp>
#include <SFML/System/Time.hpp>
#include <string>
#include <vector>
@ -49,7 +49,7 @@ class InputStream;
/// \brief Storage for audio samples defining a sound
///
////////////////////////////////////////////////////////////
class SFML_API SoundBuffer
class SFML_AUDIO_API SoundBuffer
{
public :

View File

@ -28,6 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Audio/Export.hpp>
#include <SFML/Audio/SoundBuffer.hpp>
#include <SFML/Audio/SoundRecorder.hpp>
#include <vector>
@ -40,7 +41,7 @@ namespace sf
/// audio data into a sound buffer
///
////////////////////////////////////////////////////////////
class SFML_API SoundBufferRecorder : public SoundRecorder
class SFML_AUDIO_API SoundBufferRecorder : public SoundRecorder
{
public :

View File

@ -28,6 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Audio/Export.hpp>
#include <SFML/System/Thread.hpp>
#include <vector>
@ -38,7 +39,7 @@ namespace sf
/// \brief Abstract base class for capturing sound data
///
////////////////////////////////////////////////////////////
class SFML_API SoundRecorder
class SFML_AUDIO_API SoundRecorder
{
public :

View File

@ -28,7 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.hpp>
#include <SFML/Audio/Export.hpp>
#include <SFML/System/Vector3.hpp>
@ -38,7 +38,7 @@ namespace sf
/// \brief Base class defining a sound's properties
///
////////////////////////////////////////////////////////////
class SFML_API SoundSource
class SFML_AUDIO_API SoundSource
{
public :

View File

@ -28,6 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Audio/Export.hpp>
#include <SFML/Audio/SoundSource.hpp>
#include <SFML/System/Thread.hpp>
#include <SFML/System/Time.hpp>
@ -40,7 +41,7 @@ namespace sf
/// \brief Abstract base class for streamed audio sources
///
////////////////////////////////////////////////////////////
class SFML_API SoundStream : public SoundSource
class SFML_AUDIO_API SoundStream : public SoundSource
{
public :

View File

@ -68,7 +68,7 @@
////////////////////////////////////////////////////////////
// Identify the endianess
// Identify the endianness
////////////////////////////////////////////////////////////
#if defined(__m68k__) || defined(mc68000) || defined(_M_M68K) || (defined(__MIPS__) && defined(__MISPEB__)) || \
defined(__ppc__) || defined(__POWERPC__) || defined(_M_PPC) || defined(__sparc__) || defined(__hppa__)
@ -95,27 +95,17 @@
////////////////////////////////////////////////////////////
// Define portable import / export macros
// Define helpers to create portable import / export macros for each module
////////////////////////////////////////////////////////////
#if !defined(SFML_STATIC)
#if defined(SFML_SYSTEM_WINDOWS)
#ifdef SFML_EXPORTS
// Windows compilers need specific (and different) keywords for export and import
#define SFML_API_EXPORT __declspec(dllexport)
#define SFML_API_IMPORT __declspec(dllimport)
// From DLL side, we must export
#define SFML_API __declspec(dllexport)
#else
// From client application side, we must import
#define SFML_API __declspec(dllimport)
#endif
// For Visual C++ compilers, we also need to turn off this annoying C4251 warning.
// You can read lots ot different things about it, but the point is the code will
// just work fine, and so the simplest way to get rid of this warning is to disable it
// For Visual C++ compilers, we also need to turn off this annoying C4251 warning
#ifdef _MSC_VER
#pragma warning(disable : 4251)
@ -126,13 +116,16 @@
#if __GNUC__ >= 4
// gcc 4 has special keywords for showing/hidding symbols
#define SFML_API __attribute__ ((__visibility__ ("default")))
// GCC 4 has special keywords for showing/hidding symbols,
// the same keyword is used for both importing and exporting
#define SFML_API_EXPORT __attribute__ ((__visibility__ ("default")))
#define SFML_API_IMPORT __attribute__ ((__visibility__ ("default")))
#else
// gcc < 4 has no mechanism to explicitely hide symbols, everything's exported
#define SFML_API
// GCC < 4 has no mechanism to explicitely hide symbols, everything's exported
#define SFML_API_EXPORT
#define SFML_API_IMPORT
#endif
@ -140,8 +133,9 @@
#else
// Static build doesn't need these export macros
#define SFML_API
// Static build doesn't need import/export macros
#define SFML_API_EXPORT
#define SFML_API_IMPORT
#endif

View File

@ -28,6 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Graphics/Export.hpp>
#include <SFML/Graphics/Shape.hpp>
@ -37,7 +38,7 @@ namespace sf
/// \brief Specialized shape representing a circle
///
////////////////////////////////////////////////////////////
class SFML_API CircleShape : public Shape
class SFML_GRAPHICS_API CircleShape : public Shape
{
public :

View File

@ -28,7 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.hpp>
#include <SFML/Graphics/Export.hpp>
namespace sf
@ -37,7 +37,7 @@ namespace sf
/// \brief Utility class for manpulating RGBA colors
///
////////////////////////////////////////////////////////////
class SFML_API Color
class SFML_GRAPHICS_API Color
{
public :
@ -95,7 +95,7 @@ public :
/// \return True if colors are equal, false if they are different
///
////////////////////////////////////////////////////////////
SFML_API bool operator ==(const Color& left, const Color& right);
SFML_GRAPHICS_API bool operator ==(const Color& left, const Color& right);
////////////////////////////////////////////////////////////
/// \relates Color
@ -109,7 +109,7 @@ SFML_API bool operator ==(const Color& left, const Color& right);
/// \return True if colors are different, false if they are equal
///
////////////////////////////////////////////////////////////
SFML_API bool operator !=(const Color& left, const Color& right);
SFML_GRAPHICS_API bool operator !=(const Color& left, const Color& right);
////////////////////////////////////////////////////////////
/// \relates Color
@ -124,7 +124,7 @@ SFML_API bool operator !=(const Color& left, const Color& right);
/// \return Result of \a left + \a right
///
////////////////////////////////////////////////////////////
SFML_API Color operator +(const Color& left, const Color& right);
SFML_GRAPHICS_API Color operator +(const Color& left, const Color& right);
////////////////////////////////////////////////////////////
/// \relates Color
@ -141,7 +141,7 @@ SFML_API Color operator +(const Color& left, const Color& right);
/// \return Result of \a left * \a right
///
////////////////////////////////////////////////////////////
SFML_API Color operator *(const Color& left, const Color& right);
SFML_GRAPHICS_API Color operator *(const Color& left, const Color& right);
////////////////////////////////////////////////////////////
/// \relates Color
@ -157,7 +157,7 @@ SFML_API Color operator *(const Color& left, const Color& right);
/// \return Reference to \a left
///
////////////////////////////////////////////////////////////
SFML_API Color& operator +=(Color& left, const Color& right);
SFML_GRAPHICS_API Color& operator +=(Color& left, const Color& right);
////////////////////////////////////////////////////////////
/// \relates Color
@ -175,7 +175,7 @@ SFML_API Color& operator +=(Color& left, const Color& right);
/// \return Reference to \a left
///
////////////////////////////////////////////////////////////
SFML_API Color& operator *=(Color& left, const Color& right);
SFML_GRAPHICS_API Color& operator *=(Color& left, const Color& right);
} // namespace sf

View File

@ -28,6 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Graphics/Export.hpp>
#include <SFML/Graphics/Shape.hpp>
#include <vector>
@ -38,7 +39,7 @@ namespace sf
/// \brief Specialized shape representing a convex polygon
///
////////////////////////////////////////////////////////////
class SFML_API ConvexShape : public Shape
class SFML_GRAPHICS_API ConvexShape : public Shape
{
public :

View File

@ -28,7 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.hpp>
#include <SFML/Graphics/Export.hpp>
#include <SFML/Graphics/RenderStates.hpp>
@ -41,7 +41,7 @@ class RenderTarget;
/// to a render target
///
////////////////////////////////////////////////////////////
class SFML_API Drawable
class SFML_GRAPHICS_API Drawable
{
public :

View File

@ -0,0 +1,48 @@
////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
// Copyright (C) 2007-2009 Laurent Gomila (laurent.gom@gmail.com)
//
// This software is provided 'as-is', without any express or implied warranty.
// In no event will the authors be held liable for any damages arising from the use of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it freely,
// subject to the following restrictions:
//
// 1. The origin of this software must not be misrepresented;
// you must not claim that you wrote the original software.
// If you use this software in a product, an acknowledgment
// in the product documentation would be appreciated but is not required.
//
// 2. Altered source versions must be plainly marked as such,
// and must not be misrepresented as being the original software.
//
// 3. This notice may not be removed or altered from any source distribution.
//
////////////////////////////////////////////////////////////
#ifndef SFML_GRAPHICS_EXPORT_HPP
#define SFML_GRAPHICS_EXPORT_HPP
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.hpp>
////////////////////////////////////////////////////////////
// Define portable import / export macros
////////////////////////////////////////////////////////////
#if defined(SFML_GRAPHICS_EXPORTS)
#define SFML_GRAPHICS_API SFML_API_EXPORT
#else
#define SFML_GRAPHICS_API SFML_API_IMPORT
#endif
#endif // SFML_GRAPHICS_EXPORT_HPP

View File

@ -28,11 +28,12 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/System/Vector2.hpp>
#include <SFML/System/String.hpp>
#include <SFML/Graphics/Export.hpp>
#include <SFML/Graphics/Glyph.hpp>
#include <SFML/Graphics/Texture.hpp>
#include <SFML/Graphics/Rect.hpp>
#include <SFML/System/Vector2.hpp>
#include <SFML/System/String.hpp>
#include <map>
#include <string>
#include <vector>
@ -46,7 +47,7 @@ class InputStream;
/// \brief Class for loading and manipulating character fonts
///
////////////////////////////////////////////////////////////
class SFML_API Font
class SFML_GRAPHICS_API Font
{
public :

View File

@ -28,7 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.hpp>
#include <SFML/Graphics/Export.hpp>
#include <SFML/Graphics/Rect.hpp>
@ -38,7 +38,7 @@ namespace sf
/// \brief Structure describing a glyph
///
////////////////////////////////////////////////////////////
class SFML_API Glyph
class SFML_GRAPHICS_API Glyph
{
public :

View File

@ -28,6 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Graphics/Export.hpp>
#include <SFML/Graphics/Color.hpp>
#include <SFML/Graphics/Rect.hpp>
#include <string>
@ -42,7 +43,7 @@ class InputStream;
/// \brief Class for loading, manipulating and saving images
///
////////////////////////////////////////////////////////////
class SFML_API Image
class SFML_GRAPHICS_API Image
{
public :

View File

@ -28,6 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Graphics/Export.hpp>
#include <SFML/Graphics/Shape.hpp>
@ -37,7 +38,7 @@ namespace sf
/// \brief Specialized shape representing a rectangle
///
////////////////////////////////////////////////////////////
class SFML_API RectangleShape : public Shape
class SFML_GRAPHICS_API RectangleShape : public Shape
{
public :

View File

@ -28,6 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Graphics/Export.hpp>
#include <SFML/Graphics/BlendMode.hpp>
#include <SFML/Graphics/Transform.hpp>
@ -41,7 +42,7 @@ class Texture;
/// \brief Define the states used for drawing to a RenderTarget
///
////////////////////////////////////////////////////////////
class SFML_API RenderStates
class SFML_GRAPHICS_API RenderStates
{
public :

View File

@ -28,7 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/System/NonCopyable.hpp>
#include <SFML/Graphics/Export.hpp>
#include <SFML/Graphics/Color.hpp>
#include <SFML/Graphics/Rect.hpp>
#include <SFML/Graphics/View.hpp>
@ -37,6 +37,7 @@
#include <SFML/Graphics/RenderStates.hpp>
#include <SFML/Graphics/PrimitiveType.hpp>
#include <SFML/Graphics/Vertex.hpp>
#include <SFML/System/NonCopyable.hpp>
namespace sf
@ -47,7 +48,7 @@ class Drawable;
/// \brief Base class for all render targets (window, texture, ...)
///
////////////////////////////////////////////////////////////
class SFML_API RenderTarget : NonCopyable
class SFML_GRAPHICS_API RenderTarget : NonCopyable
{
public :

View File

@ -28,6 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Graphics/Export.hpp>
#include <SFML/Graphics/Texture.hpp>
#include <SFML/Graphics/RenderTarget.hpp>
@ -43,7 +44,7 @@ namespace priv
/// \brief Target for off-screen 2D rendering into an texture
///
////////////////////////////////////////////////////////////
class SFML_API RenderTexture : public RenderTarget
class SFML_GRAPHICS_API RenderTexture : public RenderTarget
{
public :

View File

@ -28,6 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Graphics/Export.hpp>
#include <SFML/Graphics/RenderTarget.hpp>
#include <SFML/Graphics/Image.hpp>
#include <SFML/Window/Window.hpp>
@ -40,7 +41,7 @@ namespace sf
/// \brief Window that can serve as a target for 2D drawing
///
////////////////////////////////////////////////////////////
class SFML_API RenderWindow : public Window, public RenderTarget
class SFML_GRAPHICS_API RenderWindow : public Window, public RenderTarget
{
public :

View File

@ -28,7 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.hpp>
#include <SFML/Graphics/Export.hpp>
#include <SFML/Graphics/Transform.hpp>
#include <SFML/Graphics/Color.hpp>
#include <SFML/Window/GlResource.hpp>
@ -48,7 +48,7 @@ class Texture;
/// \brief Shader class (vertex and fragment)
///
////////////////////////////////////////////////////////////
class SFML_API Shader : GlResource, NonCopyable
class SFML_GRAPHICS_API Shader : GlResource, NonCopyable
{
public :

View File

@ -28,6 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Graphics/Export.hpp>
#include <SFML/Graphics/Drawable.hpp>
#include <SFML/Graphics/Transformable.hpp>
#include <SFML/Graphics/VertexArray.hpp>
@ -40,7 +41,7 @@ namespace sf
/// \brief Base class for textured shapes with outline
///
////////////////////////////////////////////////////////////
class SFML_API Shape : public Drawable, public Transformable
class SFML_GRAPHICS_API Shape : public Drawable, public Transformable
{
public :

View File

@ -28,6 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Graphics/Export.hpp>
#include <SFML/Graphics/Drawable.hpp>
#include <SFML/Graphics/Transformable.hpp>
#include <SFML/Graphics/Vertex.hpp>
@ -43,7 +44,7 @@ class Texture;
/// own transformations, color, etc.
///
////////////////////////////////////////////////////////////
class SFML_API Sprite : public Drawable, public Transformable
class SFML_GRAPHICS_API Sprite : public Drawable, public Transformable
{
public :

View File

@ -28,12 +28,13 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/System/String.hpp>
#include <SFML/Graphics/Export.hpp>
#include <SFML/Graphics/Drawable.hpp>
#include <SFML/Graphics/Transformable.hpp>
#include <SFML/Graphics/Font.hpp>
#include <SFML/Graphics/Rect.hpp>
#include <SFML/Graphics/VertexArray.hpp>
#include <SFML/System/String.hpp>
#include <string>
#include <vector>
@ -44,7 +45,7 @@ namespace sf
/// \brief Graphical text that can be drawn to a render target
///
////////////////////////////////////////////////////////////
class SFML_API Text : public Drawable, public Transformable
class SFML_GRAPHICS_API Text : public Drawable, public Transformable
{
public :

View File

@ -28,6 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Graphics/Export.hpp>
#include <SFML/Graphics/Image.hpp>
#include <SFML/Window/GlResource.hpp>
@ -43,7 +44,7 @@ class InputStream;
/// \brief Image living on the graphics card that can be used for drawing
///
////////////////////////////////////////////////////////////
class SFML_API Texture : GlResource
class SFML_GRAPHICS_API Texture : GlResource
{
public :

View File

@ -28,7 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.hpp>
#include <SFML/Graphics/Export.hpp>
#include <SFML/Graphics/Rect.hpp>
#include <SFML/System/Vector2.hpp>
@ -39,7 +39,7 @@ namespace sf
/// \brief Define a 3x3 transform matrix
///
////////////////////////////////////////////////////////////
class SFML_API Transform
class SFML_GRAPHICS_API Transform
{
public :
@ -373,7 +373,7 @@ private:
/// \return New combined transform
///
////////////////////////////////////////////////////////////
SFML_API Transform operator *(const Transform& left, const Transform& right);
SFML_GRAPHICS_API Transform operator *(const Transform& left, const Transform& right);
////////////////////////////////////////////////////////////
/// \relates sf::Transform
@ -387,7 +387,7 @@ SFML_API Transform operator *(const Transform& left, const Transform& right);
/// \return The combined transform
///
////////////////////////////////////////////////////////////
SFML_API Transform& operator *=(Transform& left, const Transform& right);
SFML_GRAPHICS_API Transform& operator *=(Transform& left, const Transform& right);
////////////////////////////////////////////////////////////
/// \relates sf::Transform
@ -401,7 +401,7 @@ SFML_API Transform& operator *=(Transform& left, const Transform& right);
/// \return New transformed point
///
////////////////////////////////////////////////////////////
SFML_API Vector2f operator *(const Transform& left, const Vector2f& right);
SFML_GRAPHICS_API Vector2f operator *(const Transform& left, const Vector2f& right);
} // namespace sf

View File

@ -28,6 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Graphics/Export.hpp>
#include <SFML/Graphics/Transform.hpp>
@ -37,7 +38,7 @@ namespace sf
/// \brief Decomposed transform defined by a position, a rotation and a scale
///
////////////////////////////////////////////////////////////
class SFML_API Transformable
class SFML_GRAPHICS_API Transformable
{
public :

View File

@ -28,8 +28,9 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/System/Vector2.hpp>
#include <SFML/Graphics/Export.hpp>
#include <SFML/Graphics/Color.hpp>
#include <SFML/System/Vector2.hpp>
namespace sf
@ -38,7 +39,7 @@ namespace sf
/// \brief Define a point with color and texture coordinates
///
////////////////////////////////////////////////////////////
class SFML_API Vertex
class SFML_GRAPHICS_API Vertex
{
public :

View File

@ -28,6 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Graphics/Export.hpp>
#include <SFML/Graphics/Vertex.hpp>
#include <SFML/Graphics/PrimitiveType.hpp>
#include <SFML/Graphics/Rect.hpp>
@ -41,7 +42,7 @@ namespace sf
/// \brief Define a set of one or more 2D primitives
///
////////////////////////////////////////////////////////////
class SFML_API VertexArray : public Drawable
class SFML_GRAPHICS_API VertexArray : public Drawable
{
public :

View File

@ -28,7 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.hpp>
#include <SFML/Graphics/Export.hpp>
#include <SFML/Graphics/Rect.hpp>
#include <SFML/Graphics/Transform.hpp>
#include <SFML/System/Vector2.hpp>
@ -40,7 +40,7 @@ namespace sf
/// \brief 2D camera that defines what region is shown on screen
///
////////////////////////////////////////////////////////////
class SFML_API View
class SFML_GRAPHICS_API View
{
public :

View File

@ -0,0 +1,48 @@
////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
// Copyright (C) 2007-2009 Laurent Gomila (laurent.gom@gmail.com)
//
// This software is provided 'as-is', without any express or implied warranty.
// In no event will the authors be held liable for any damages arising from the use of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it freely,
// subject to the following restrictions:
//
// 1. The origin of this software must not be misrepresented;
// you must not claim that you wrote the original software.
// If you use this software in a product, an acknowledgment
// in the product documentation would be appreciated but is not required.
//
// 2. Altered source versions must be plainly marked as such,
// and must not be misrepresented as being the original software.
//
// 3. This notice may not be removed or altered from any source distribution.
//
////////////////////////////////////////////////////////////
#ifndef SFML_NETWORK_EXPORT_HPP
#define SFML_NETWORK_EXPORT_HPP
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.hpp>
////////////////////////////////////////////////////////////
// Define portable import / export macros
////////////////////////////////////////////////////////////
#if defined(SFML_NETWORK_EXPORTS)
#define SFML_NETWORK_API SFML_API_EXPORT
#else
#define SFML_NETWORK_API SFML_API_IMPORT
#endif
#endif // SFML_NETWORK_EXPORT_HPP

View File

@ -28,9 +28,10 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Network/Export.hpp>
#include <SFML/Network/TcpSocket.hpp>
#include <SFML/System/NonCopyable.hpp>
#include <SFML/System/Time.hpp>
#include <SFML/Network/TcpSocket.hpp>
#include <string>
#include <vector>
@ -43,7 +44,7 @@ class IpAddress;
/// \brief A FTP client
///
////////////////////////////////////////////////////////////
class SFML_API Ftp : NonCopyable
class SFML_NETWORK_API Ftp : NonCopyable
{
public :
@ -62,7 +63,7 @@ public :
/// \brief Define a FTP response
///
////////////////////////////////////////////////////////////
class SFML_API Response
class SFML_NETWORK_API Response
{
public :
@ -184,7 +185,7 @@ public :
/// \brief Specialization of FTP response returning a directory
///
////////////////////////////////////////////////////////////
class SFML_API DirectoryResponse : public Response
class SFML_NETWORK_API DirectoryResponse : public Response
{
public :
@ -217,7 +218,7 @@ public :
/// \brief Specialization of FTP response returning a
/// filename lisiting
////////////////////////////////////////////////////////////
class SFML_API ListingResponse : public Response
class SFML_NETWORK_API ListingResponse : public Response
{
public :

View File

@ -28,10 +28,11 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/System/NonCopyable.hpp>
#include <SFML/System/Time.hpp>
#include <SFML/Network/Export.hpp>
#include <SFML/Network/IpAddress.hpp>
#include <SFML/Network/TcpSocket.hpp>
#include <SFML/System/NonCopyable.hpp>
#include <SFML/System/Time.hpp>
#include <map>
#include <string>
@ -42,7 +43,7 @@ namespace sf
/// \brief A HTTP client
///
////////////////////////////////////////////////////////////
class SFML_API Http : NonCopyable
class SFML_NETWORK_API Http : NonCopyable
{
public :
@ -50,7 +51,7 @@ public :
/// \brief Define a HTTP request
///
////////////////////////////////////////////////////////////
class SFML_API Request
class SFML_NETWORK_API Request
{
public :
@ -187,7 +188,7 @@ public :
/// \brief Define a HTTP response
///
////////////////////////////////////////////////////////////
class SFML_API Response
class SFML_NETWORK_API Response
{
public :

View File

@ -28,7 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.hpp>
#include <SFML/Network/Export.hpp>
#include <SFML/System/Time.hpp>
#include <istream>
#include <ostream>
@ -41,7 +41,7 @@ namespace sf
/// \brief Encapsulate an IPv4 network address
///
////////////////////////////////////////////////////////////
class SFML_API IpAddress
class SFML_NETWORK_API IpAddress
{
public :
@ -201,7 +201,7 @@ private :
/// \return True if both addresses are equal
///
////////////////////////////////////////////////////////////
SFML_API bool operator ==(const IpAddress& left, const IpAddress& right);
SFML_NETWORK_API bool operator ==(const IpAddress& left, const IpAddress& right);
////////////////////////////////////////////////////////////
/// \brief Overload of != operator to compare two IP addresses
@ -212,7 +212,7 @@ SFML_API bool operator ==(const IpAddress& left, const IpAddress& right);
/// \return True if both addresses are different
///
////////////////////////////////////////////////////////////
SFML_API bool operator !=(const IpAddress& left, const IpAddress& right);
SFML_NETWORK_API bool operator !=(const IpAddress& left, const IpAddress& right);
////////////////////////////////////////////////////////////
/// \brief Overload of < operator to compare two IP addresses
@ -223,7 +223,7 @@ SFML_API bool operator !=(const IpAddress& left, const IpAddress& right);
/// \return True if \a left is lesser than \a right
///
////////////////////////////////////////////////////////////
SFML_API bool operator <(const IpAddress& left, const IpAddress& right);
SFML_NETWORK_API bool operator <(const IpAddress& left, const IpAddress& right);
////////////////////////////////////////////////////////////
/// \brief Overload of > operator to compare two IP addresses
@ -234,7 +234,7 @@ SFML_API bool operator <(const IpAddress& left, const IpAddress& right);
/// \return True if \a left is greater than \a right
///
////////////////////////////////////////////////////////////
SFML_API bool operator >(const IpAddress& left, const IpAddress& right);
SFML_NETWORK_API bool operator >(const IpAddress& left, const IpAddress& right);
////////////////////////////////////////////////////////////
/// \brief Overload of <= operator to compare two IP addresses
@ -245,7 +245,7 @@ SFML_API bool operator >(const IpAddress& left, const IpAddress& right);
/// \return True if \a left is lesser or equal than \a right
///
////////////////////////////////////////////////////////////
SFML_API bool operator <=(const IpAddress& left, const IpAddress& right);
SFML_NETWORK_API bool operator <=(const IpAddress& left, const IpAddress& right);
////////////////////////////////////////////////////////////
/// \brief Overload of >= operator to compare two IP addresses
@ -256,7 +256,7 @@ SFML_API bool operator <=(const IpAddress& left, const IpAddress& right);
/// \return True if \a left is greater or equal than \a right
///
////////////////////////////////////////////////////////////
SFML_API bool operator >=(const IpAddress& left, const IpAddress& right);
SFML_NETWORK_API bool operator >=(const IpAddress& left, const IpAddress& right);
////////////////////////////////////////////////////////////
/// \brief Overload of >> operator to extract an IP address from an input stream
@ -267,7 +267,7 @@ SFML_API bool operator >=(const IpAddress& left, const IpAddress& right);
/// \return Reference to the input stream
///
////////////////////////////////////////////////////////////
SFML_API std::istream& operator >>(std::istream& stream, IpAddress& address);
SFML_NETWORK_API std::istream& operator >>(std::istream& stream, IpAddress& address);
////////////////////////////////////////////////////////////
/// \brief Overload of << operator to print an IP address to an output stream
@ -278,7 +278,7 @@ SFML_API std::istream& operator >>(std::istream& stream, IpAddress& address);
/// \return Reference to the output stream
///
////////////////////////////////////////////////////////////
SFML_API std::ostream& operator <<(std::ostream& stream, const IpAddress& address);
SFML_NETWORK_API std::ostream& operator <<(std::ostream& stream, const IpAddress& address);
} // namespace sf

View File

@ -28,7 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.hpp>
#include <SFML/Network/Export.hpp>
#include <string>
#include <vector>
@ -44,7 +44,7 @@ class UdpSocket;
/// over the network
///
////////////////////////////////////////////////////////////
class SFML_API Packet
class SFML_NETWORK_API Packet
{
// A bool-like type that cannot be converted to integer or pointer types
typedef bool (Packet::*BoolType)(std::size_t);

View File

@ -28,6 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Network/Export.hpp>
#include <SFML/Network/SocketHandle.hpp>
#include <SFML/System/NonCopyable.hpp>
#include <vector>
@ -41,7 +42,7 @@ class SocketSelector;
/// \brief Base class for all the socket types
///
////////////////////////////////////////////////////////////
class SFML_API Socket : NonCopyable
class SFML_NETWORK_API Socket : NonCopyable
{
public :

View File

@ -28,7 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.hpp>
#include <SFML/Network/Export.hpp>
#include <SFML/System/Time.hpp>
@ -40,7 +40,7 @@ class Socket;
/// \brief Multiplexer that allows to read from multiple sockets
///
////////////////////////////////////////////////////////////
class SFML_API SocketSelector
class SFML_NETWORK_API SocketSelector
{
public :

View File

@ -28,6 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Network/Export.hpp>
#include <SFML/Network/Socket.hpp>
@ -39,7 +40,7 @@ class TcpSocket;
/// \brief Socket that listens to new TCP connections
///
////////////////////////////////////////////////////////////
class SFML_API TcpListener : public Socket
class SFML_NETWORK_API TcpListener : public Socket
{
public :

View File

@ -28,6 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Network/Export.hpp>
#include <SFML/Network/Socket.hpp>
#include <SFML/System/Time.hpp>
@ -42,7 +43,7 @@ class Packet;
/// \brief Specialized socket using the TCP protocol
///
////////////////////////////////////////////////////////////
class SFML_API TcpSocket : public Socket
class SFML_NETWORK_API TcpSocket : public Socket
{
public :

View File

@ -28,6 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Network/Export.hpp>
#include <SFML/Network/Socket.hpp>
#include <vector>
@ -41,7 +42,7 @@ class Packet;
/// \brief Specialized socket using the UDP protocol
///
////////////////////////////////////////////////////////////
class SFML_API UdpSocket : public Socket
class SFML_NETWORK_API UdpSocket : public Socket
{
public :

View File

@ -28,7 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.hpp>
#include <SFML/System/Export.hpp>
#include <SFML/System/Time.hpp>
@ -38,7 +38,7 @@ namespace sf
/// \brief Utility class that measures the elapsed time
///
////////////////////////////////////////////////////////////
class SFML_API Clock
class SFML_SYSTEM_API Clock
{
public :

View File

@ -28,7 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.hpp>
#include <SFML/System/Export.hpp>
#include <ostream>
@ -38,7 +38,7 @@ namespace sf
/// \brief Standard stream used by SFML to output warnings and errors
///
////////////////////////////////////////////////////////////
SFML_API std::ostream& Err();
SFML_SYSTEM_API std::ostream& Err();
} // namespace sf

View File

@ -0,0 +1,48 @@
////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
// Copyright (C) 2007-2009 Laurent Gomila (laurent.gom@gmail.com)
//
// This software is provided 'as-is', without any express or implied warranty.
// In no event will the authors be held liable for any damages arising from the use of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it freely,
// subject to the following restrictions:
//
// 1. The origin of this software must not be misrepresented;
// you must not claim that you wrote the original software.
// If you use this software in a product, an acknowledgment
// in the product documentation would be appreciated but is not required.
//
// 2. Altered source versions must be plainly marked as such,
// and must not be misrepresented as being the original software.
//
// 3. This notice may not be removed or altered from any source distribution.
//
////////////////////////////////////////////////////////////
#ifndef SFML_SYSTEM_EXPORT_HPP
#define SFML_SYSTEM_EXPORT_HPP
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.hpp>
////////////////////////////////////////////////////////////
// Define portable import / export macros
////////////////////////////////////////////////////////////
#if defined(SFML_SYSTEM_EXPORTS)
#define SFML_SYSTEM_API SFML_API_EXPORT
#else
#define SFML_SYSTEM_API SFML_API_IMPORT
#endif
#endif // SFML_SYSTEM_EXPORT_HPP

View File

@ -28,6 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/System/Export.hpp>
#include <SFML/System/NonCopyable.hpp>
@ -39,7 +40,7 @@ class Mutex;
/// \brief Automatic wrapper for locking and unlocking mutexes
///
////////////////////////////////////////////////////////////
class SFML_API Lock : NonCopyable
class SFML_SYSTEM_API Lock : NonCopyable
{
public :

View File

@ -28,7 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.hpp>
#include <SFML/System/Export.hpp>
#include <SFML/System/NonCopyable.hpp>
@ -44,7 +44,7 @@ namespace priv
/// from multiple threads
///
////////////////////////////////////////////////////////////
class SFML_API Mutex : NonCopyable
class SFML_SYSTEM_API Mutex : NonCopyable
{
public :

View File

@ -28,7 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.hpp>
#include <SFML/System/Export.hpp>
namespace sf
@ -38,7 +38,7 @@ namespace sf
/// class non-copyable
///
////////////////////////////////////////////////////////////
class SFML_API NonCopyable
class SFML_SYSTEM_API NonCopyable
{
protected :

View File

@ -28,7 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.hpp>
#include <SFML/System/Export.hpp>
#include <SFML/System/Time.hpp>
@ -44,7 +44,7 @@ namespace sf
/// \param duration Time to sleep
///
////////////////////////////////////////////////////////////
void SFML_API Sleep(Time duration);
void SFML_SYSTEM_API Sleep(Time duration);
} // namespace sf

View File

@ -28,7 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.hpp>
#include <SFML/System/Export.hpp>
#include <locale>
#include <string>
@ -40,7 +40,7 @@ namespace sf
/// conversions between types and encodings
///
////////////////////////////////////////////////////////////
class SFML_API String
class SFML_SYSTEM_API String
{
public :
@ -394,8 +394,8 @@ public :
private :
friend SFML_API bool operator ==(const String& left, const String& right);
friend SFML_API bool operator <(const String& left, const String& right);
friend SFML_SYSTEM_API bool operator ==(const String& left, const String& right);
friend SFML_SYSTEM_API bool operator <(const String& left, const String& right);
////////////////////////////////////////////////////////////
// Member data
@ -413,7 +413,7 @@ private :
/// \return True if both strings are equal
///
////////////////////////////////////////////////////////////
SFML_API bool operator ==(const String& left, const String& right);
SFML_SYSTEM_API bool operator ==(const String& left, const String& right);
////////////////////////////////////////////////////////////
/// \relates String
@ -425,7 +425,7 @@ SFML_API bool operator ==(const String& left, const String& right);
/// \return True if both strings are different
///
////////////////////////////////////////////////////////////
SFML_API bool operator !=(const String& left, const String& right);
SFML_SYSTEM_API bool operator !=(const String& left, const String& right);
////////////////////////////////////////////////////////////
/// \relates String
@ -437,7 +437,7 @@ SFML_API bool operator !=(const String& left, const String& right);
/// \return True if \a left is alphabetically lesser than \a right
///
////////////////////////////////////////////////////////////
SFML_API bool operator <(const String& left, const String& right);
SFML_SYSTEM_API bool operator <(const String& left, const String& right);
////////////////////////////////////////////////////////////
/// \relates String
@ -449,7 +449,7 @@ SFML_API bool operator <(const String& left, const String& right);
/// \return True if \a left is alphabetically greater than \a right
///
////////////////////////////////////////////////////////////
SFML_API bool operator >(const String& left, const String& right);
SFML_SYSTEM_API bool operator >(const String& left, const String& right);
////////////////////////////////////////////////////////////
/// \relates String
@ -461,7 +461,7 @@ SFML_API bool operator >(const String& left, const String& right);
/// \return True if \a left is alphabetically lesser or equal than \a right
///
////////////////////////////////////////////////////////////
SFML_API bool operator <=(const String& left, const String& right);
SFML_SYSTEM_API bool operator <=(const String& left, const String& right);
////////////////////////////////////////////////////////////
/// \relates String
@ -473,7 +473,7 @@ SFML_API bool operator <=(const String& left, const String& right);
/// \return True if \a left is alphabetically greater or equal than \a right
///
////////////////////////////////////////////////////////////
SFML_API bool operator >=(const String& left, const String& right);
SFML_SYSTEM_API bool operator >=(const String& left, const String& right);
////////////////////////////////////////////////////////////
/// \relates String
@ -485,7 +485,7 @@ SFML_API bool operator >=(const String& left, const String& right);
/// \return Concatenated string
///
////////////////////////////////////////////////////////////
SFML_API String operator +(const String& left, const String& right);
SFML_SYSTEM_API String operator +(const String& left, const String& right);
} // namespace sf

View File

@ -28,7 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.hpp>
#include <SFML/System/Export.hpp>
#include <SFML/System/NonCopyable.hpp>
#include <cstdlib>
@ -45,7 +45,7 @@ namespace priv
/// \brief Utility class to manipulate threads
///
////////////////////////////////////////////////////////////
class SFML_API Thread : NonCopyable
class SFML_SYSTEM_API Thread : NonCopyable
{
public :

View File

@ -28,7 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.hpp>
#include <SFML/System/Export.hpp>
#include <SFML/System/NonCopyable.hpp>
#include <cstdlib>
@ -44,7 +44,7 @@ namespace priv
/// \brief Defines variables with thread-local storage
///
////////////////////////////////////////////////////////////
class SFML_API ThreadLocal : NonCopyable
class SFML_SYSTEM_API ThreadLocal : NonCopyable
{
public :

View File

@ -28,7 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.hpp>
#include <SFML/System/Export.hpp>
namespace sf
@ -37,7 +37,7 @@ namespace sf
/// \brief Represents a time value
///
////////////////////////////////////////////////////////////
class SFML_API Time
class SFML_SYSTEM_API Time
{
public :
@ -86,9 +86,9 @@ public :
private :
friend SFML_API Time Seconds(float);
friend SFML_API Time Milliseconds(Int32);
friend SFML_API Time Microseconds(Int64);
friend SFML_SYSTEM_API Time Seconds(float);
friend SFML_SYSTEM_API Time Milliseconds(Int32);
friend SFML_SYSTEM_API Time Microseconds(Int64);
////////////////////////////////////////////////////////////
/// \brief Construct from a number of microseconds
@ -120,7 +120,7 @@ private :
/// \see Milliseconds, Microseconds
///
////////////////////////////////////////////////////////////
SFML_API Time Seconds(float amount);
SFML_SYSTEM_API Time Seconds(float amount);
////////////////////////////////////////////////////////////
/// \relates Time
@ -133,7 +133,7 @@ SFML_API Time Seconds(float amount);
/// \see Seconds, Microseconds
///
////////////////////////////////////////////////////////////
SFML_API Time Milliseconds(Int32 amount);
SFML_SYSTEM_API Time Milliseconds(Int32 amount);
////////////////////////////////////////////////////////////
/// \relates Time
@ -146,7 +146,7 @@ SFML_API Time Milliseconds(Int32 amount);
/// \see Seconds, Milliseconds
///
////////////////////////////////////////////////////////////
SFML_API Time Microseconds(Int64 amount);
SFML_SYSTEM_API Time Microseconds(Int64 amount);
////////////////////////////////////////////////////////////
/// \relates Time
@ -158,7 +158,7 @@ SFML_API Time Microseconds(Int64 amount);
/// \return True if both time values are equal
///
////////////////////////////////////////////////////////////
SFML_API bool operator ==(const Time& left, const Time& right);
SFML_SYSTEM_API bool operator ==(const Time& left, const Time& right);
////////////////////////////////////////////////////////////
/// \relates Time
@ -170,7 +170,7 @@ SFML_API bool operator ==(const Time& left, const Time& right);
/// \return True if both time values are different
///
////////////////////////////////////////////////////////////
SFML_API bool operator !=(const Time& left, const Time& right);
SFML_SYSTEM_API bool operator !=(const Time& left, const Time& right);
////////////////////////////////////////////////////////////
/// \relates Time
@ -182,7 +182,7 @@ SFML_API bool operator !=(const Time& left, const Time& right);
/// \return True if \a left is lesser than \a right
///
////////////////////////////////////////////////////////////
SFML_API bool operator <(const Time& left, const Time& right);
SFML_SYSTEM_API bool operator <(const Time& left, const Time& right);
////////////////////////////////////////////////////////////
/// \relates Time
@ -194,7 +194,7 @@ SFML_API bool operator <(const Time& left, const Time& right);
/// \return True if \a left is greater than \a right
///
////////////////////////////////////////////////////////////
SFML_API bool operator >(const Time& left, const Time& right);
SFML_SYSTEM_API bool operator >(const Time& left, const Time& right);
////////////////////////////////////////////////////////////
/// \relates Time
@ -206,7 +206,7 @@ SFML_API bool operator >(const Time& left, const Time& right);
/// \return True if \a left is lesser or equal than \a right
///
////////////////////////////////////////////////////////////
SFML_API bool operator <=(const Time& left, const Time& right);
SFML_SYSTEM_API bool operator <=(const Time& left, const Time& right);
////////////////////////////////////////////////////////////
/// \relates Time
@ -218,7 +218,7 @@ SFML_API bool operator <=(const Time& left, const Time& right);
/// \return True if \a left is greater or equal than \a right
///
////////////////////////////////////////////////////////////
SFML_API bool operator >=(const Time& left, const Time& right);
SFML_SYSTEM_API bool operator >=(const Time& left, const Time& right);
////////////////////////////////////////////////////////////
/// \relates Time
@ -229,7 +229,7 @@ SFML_API bool operator >=(const Time& left, const Time& right);
/// \return Opposite of the time value
///
////////////////////////////////////////////////////////////
SFML_API Time operator -(const Time& right);
SFML_SYSTEM_API Time operator -(const Time& right);
////////////////////////////////////////////////////////////
/// \relates Time
@ -241,7 +241,7 @@ SFML_API Time operator -(const Time& right);
/// \return Sum of the two times values
///
////////////////////////////////////////////////////////////
SFML_API Time operator +(const Time& left, const Time& right);
SFML_SYSTEM_API Time operator +(const Time& left, const Time& right);
////////////////////////////////////////////////////////////
/// \relates Time
@ -253,7 +253,7 @@ SFML_API Time operator +(const Time& left, const Time& right);
/// \return Sum of the two times values
///
////////////////////////////////////////////////////////////
SFML_API Time& operator +=(Time& left, const Time& right);
SFML_SYSTEM_API Time& operator +=(Time& left, const Time& right);
////////////////////////////////////////////////////////////
/// \relates Time
@ -265,7 +265,7 @@ SFML_API Time& operator +=(Time& left, const Time& right);
/// \return Difference of the two times values
///
////////////////////////////////////////////////////////////
SFML_API Time operator -(const Time& left, const Time& right);
SFML_SYSTEM_API Time operator -(const Time& left, const Time& right);
////////////////////////////////////////////////////////////
/// \relates Time
@ -277,7 +277,7 @@ SFML_API Time operator -(const Time& left, const Time& right);
/// \return Difference of the two times values
///
////////////////////////////////////////////////////////////
SFML_API Time& operator -=(Time& left, const Time& right);
SFML_SYSTEM_API Time& operator -=(Time& left, const Time& right);
////////////////////////////////////////////////////////////
/// \relates Time
@ -289,7 +289,7 @@ SFML_API Time& operator -=(Time& left, const Time& right);
/// \return \left multiplied by \right
///
////////////////////////////////////////////////////////////
SFML_API Time operator *(const Time& left, float right);
SFML_SYSTEM_API Time operator *(const Time& left, float right);
////////////////////////////////////////////////////////////
/// \relates Time
@ -301,7 +301,7 @@ SFML_API Time operator *(const Time& left, float right);
/// \return \left multiplied by \right
///
////////////////////////////////////////////////////////////
SFML_API Time operator *(const Time& left, Int64 right);
SFML_SYSTEM_API Time operator *(const Time& left, Int64 right);
////////////////////////////////////////////////////////////
/// \relates Time
@ -313,7 +313,7 @@ SFML_API Time operator *(const Time& left, Int64 right);
/// \return \left multiplied by \right
///
////////////////////////////////////////////////////////////
SFML_API Time operator *(float left, const Time& right);
SFML_SYSTEM_API Time operator *(float left, const Time& right);
////////////////////////////////////////////////////////////
/// \relates Time
@ -325,7 +325,7 @@ SFML_API Time operator *(float left, const Time& right);
/// \return \left multiplied by \right
///
////////////////////////////////////////////////////////////
SFML_API Time operator *(Int64 left, const Time& right);
SFML_SYSTEM_API Time operator *(Int64 left, const Time& right);
////////////////////////////////////////////////////////////
/// \relates Time
@ -337,7 +337,7 @@ SFML_API Time operator *(Int64 left, const Time& right);
/// \return \left multiplied by \right
///
////////////////////////////////////////////////////////////
SFML_API Time& operator *=(Time& left, float right);
SFML_SYSTEM_API Time& operator *=(Time& left, float right);
////////////////////////////////////////////////////////////
/// \relates Time
@ -349,7 +349,7 @@ SFML_API Time& operator *=(Time& left, float right);
/// \return \left multiplied by \right
///
////////////////////////////////////////////////////////////
SFML_API Time& operator *=(Time& left, Int64 right);
SFML_SYSTEM_API Time& operator *=(Time& left, Int64 right);
////////////////////////////////////////////////////////////
/// \relates Time
@ -361,7 +361,7 @@ SFML_API Time& operator *=(Time& left, Int64 right);
/// \return \left divided by \right
///
////////////////////////////////////////////////////////////
SFML_API Time operator /(const Time& left, float right);
SFML_SYSTEM_API Time operator /(const Time& left, float right);
////////////////////////////////////////////////////////////
/// \relates Time
@ -373,7 +373,7 @@ SFML_API Time operator /(const Time& left, float right);
/// \return \left divided by \right
///
////////////////////////////////////////////////////////////
SFML_API Time operator /(const Time& left, Int64 right);
SFML_SYSTEM_API Time operator /(const Time& left, Int64 right);
////////////////////////////////////////////////////////////
/// \relates Time
@ -385,7 +385,7 @@ SFML_API Time operator /(const Time& left, Int64 right);
/// \return \left divided by \right
///
////////////////////////////////////////////////////////////
SFML_API Time& operator /=(Time& left, float right);
SFML_SYSTEM_API Time& operator /=(Time& left, float right);
////////////////////////////////////////////////////////////
/// \relates Time
@ -397,7 +397,7 @@ SFML_API Time& operator /=(Time& left, float right);
/// \return \left divided by \right
///
////////////////////////////////////////////////////////////
SFML_API Time& operator /=(Time& left, Int64 right);
SFML_SYSTEM_API Time& operator /=(Time& left, Int64 right);
} // namespace sf

View File

@ -28,7 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.hpp>
#include <SFML/Window/Export.hpp>
#include <SFML/Window/GlResource.hpp>
#include <SFML/Window/ContextSettings.hpp>
#include <SFML/System/NonCopyable.hpp>
@ -45,7 +45,7 @@ namespace priv
/// \brief Class holding a valid drawing context
///
////////////////////////////////////////////////////////////
class SFML_API Context : GlResource, NonCopyable
class SFML_WINDOW_API Context : GlResource, NonCopyable
{
public :

View File

@ -0,0 +1,48 @@
////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
// Copyright (C) 2007-2009 Laurent Gomila (laurent.gom@gmail.com)
//
// This software is provided 'as-is', without any express or implied warranty.
// In no event will the authors be held liable for any damages arising from the use of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it freely,
// subject to the following restrictions:
//
// 1. The origin of this software must not be misrepresented;
// you must not claim that you wrote the original software.
// If you use this software in a product, an acknowledgment
// in the product documentation would be appreciated but is not required.
//
// 2. Altered source versions must be plainly marked as such,
// and must not be misrepresented as being the original software.
//
// 3. This notice may not be removed or altered from any source distribution.
//
////////////////////////////////////////////////////////////
#ifndef SFML_WINDOW_EXPORT_HPP
#define SFML_WINDOW_EXPORT_HPP
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.hpp>
////////////////////////////////////////////////////////////
// Define portable import / export macros
////////////////////////////////////////////////////////////
#if defined(SFML_WINDOW_EXPORTS)
#define SFML_WINDOW_API SFML_API_EXPORT
#else
#define SFML_WINDOW_API SFML_API_IMPORT
#endif
#endif // SFML_WINDOW_EXPORT_HPP

View File

@ -28,7 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.hpp>
#include <SFML/Window/Export.hpp>
namespace sf
@ -37,7 +37,7 @@ namespace sf
/// \brief Base class for classes that require an OpenGL context
///
////////////////////////////////////////////////////////////
class SFML_API GlResource
class SFML_WINDOW_API GlResource
{
protected :

View File

@ -28,7 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.hpp>
#include <SFML/Window/Export.hpp>
namespace sf
@ -37,7 +37,7 @@ namespace sf
/// \brief Give access to the real-time state of the joysticks
///
////////////////////////////////////////////////////////////
class SFML_API Joystick
class SFML_WINDOW_API Joystick
{
public :

View File

@ -28,7 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.hpp>
#include <SFML/Window/Export.hpp>
namespace sf
@ -37,7 +37,7 @@ namespace sf
/// \brief Give access to the real-time state of the keyboard
///
////////////////////////////////////////////////////////////
class SFML_API Keyboard
class SFML_WINDOW_API Keyboard
{
public :

View File

@ -28,7 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.hpp>
#include <SFML/Window/Export.hpp>
#include <SFML/System/Vector2.hpp>
@ -40,7 +40,7 @@ class Window;
/// \brief Give access to the real-time state of the mouse
///
////////////////////////////////////////////////////////////
class SFML_API Mouse
class SFML_WINDOW_API Mouse
{
public :

View File

@ -28,7 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.hpp>
#include <SFML/Window/Export.hpp>
#include <vector>
@ -38,7 +38,7 @@ namespace sf
/// \brief VideoMode defines a video mode (width, height, bpp)
///
////////////////////////////////////////////////////////////
class SFML_API VideoMode
class SFML_WINDOW_API VideoMode
{
public :
@ -114,7 +114,7 @@ public :
/// \return True if modes are equal
///
////////////////////////////////////////////////////////////
SFML_API bool operator ==(const VideoMode& left, const VideoMode& right);
SFML_WINDOW_API bool operator ==(const VideoMode& left, const VideoMode& right);
////////////////////////////////////////////////////////////
/// \relates VideoMode
@ -126,7 +126,7 @@ SFML_API bool operator ==(const VideoMode& left, const VideoMode& right);
/// \return True if modes are different
///
////////////////////////////////////////////////////////////
SFML_API bool operator !=(const VideoMode& left, const VideoMode& right);
SFML_WINDOW_API bool operator !=(const VideoMode& left, const VideoMode& right);
////////////////////////////////////////////////////////////
/// \relates VideoMode
@ -138,7 +138,7 @@ SFML_API bool operator !=(const VideoMode& left, const VideoMode& right);
/// \return True if \a left is lesser than \a right
///
////////////////////////////////////////////////////////////
SFML_API bool operator <(const VideoMode& left, const VideoMode& right);
SFML_WINDOW_API bool operator <(const VideoMode& left, const VideoMode& right);
////////////////////////////////////////////////////////////
/// \relates VideoMode
@ -150,7 +150,7 @@ SFML_API bool operator <(const VideoMode& left, const VideoMode& right);
/// \return True if \a left is greater than \a right
///
////////////////////////////////////////////////////////////
SFML_API bool operator >(const VideoMode& left, const VideoMode& right);
SFML_WINDOW_API bool operator >(const VideoMode& left, const VideoMode& right);
////////////////////////////////////////////////////////////
/// \relates VideoMode
@ -162,7 +162,7 @@ SFML_API bool operator >(const VideoMode& left, const VideoMode& right);
/// \return True if \a left is lesser or equal than \a right
///
////////////////////////////////////////////////////////////
SFML_API bool operator <=(const VideoMode& left, const VideoMode& right);
SFML_WINDOW_API bool operator <=(const VideoMode& left, const VideoMode& right);
////////////////////////////////////////////////////////////
/// \relates VideoMode
@ -174,7 +174,7 @@ SFML_API bool operator <=(const VideoMode& left, const VideoMode& right);
/// \return True if \a left is greater or equal than \a right
///
////////////////////////////////////////////////////////////
SFML_API bool operator >=(const VideoMode& left, const VideoMode& right);
SFML_WINDOW_API bool operator >=(const VideoMode& left, const VideoMode& right);
} // namespace sf

View File

@ -28,6 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Window/Export.hpp>
#include <SFML/Window/ContextSettings.hpp>
#include <SFML/Window/VideoMode.hpp>
#include <SFML/Window/WindowHandle.hpp>
@ -53,7 +54,7 @@ class Event;
/// \brief Window that serves as a target for OpenGL rendering
///
////////////////////////////////////////////////////////////
class SFML_API Window : GlResource, NonCopyable
class SFML_WINDOW_API Window : GlResource, NonCopyable
{
public :

View File

@ -8,6 +8,7 @@ set(SRC
${SRCROOT}/ALCheck.hpp
${SRCROOT}/AudioDevice.cpp
${SRCROOT}/AudioDevice.hpp
${INCROOT}/Export.hpp
${SRCROOT}/Listener.cpp
${INCROOT}/Listener.hpp
${SRCROOT}/Music.cpp

View File

@ -33,9 +33,6 @@ set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/Modules/")
# set the output directory for SFML libraries
set(LIBRARY_OUTPUT_PATH "${PROJECT_BINARY_DIR}/lib")
# define the export symbol
add_definitions(-DSFML_EXPORTS)
# add the modules subdirectories
add_subdirectory(System)
add_subdirectory(Window)

View File

@ -9,6 +9,7 @@ set(SRC
${SRCROOT}/Color.cpp
${INCROOT}/Color.hpp
${INCROOT}/Drawable.hpp
${INCROOT}/Export.hpp
${SRCROOT}/Font.cpp
${INCROOT}/Font.hpp
${INCROOT}/Glyph.hpp

View File

@ -4,6 +4,7 @@ set(SRCROOT ${PROJECT_SOURCE_DIR}/src/SFML/Network)
# all source files
set(SRC
${INCROOT}/Export.hpp
${SRCROOT}/Ftp.cpp
${INCROOT}/Ftp.hpp
${SRCROOT}/Http.cpp

View File

@ -8,6 +8,7 @@ set(SRC
${INCROOT}/Clock.hpp
${SRCROOT}/Err.cpp
${INCROOT}/Err.hpp
${INCROOT}/Export.hpp
${SRCROOT}/Lock.cpp
${INCROOT}/Lock.hpp
${SRCROOT}/Mutex.cpp

View File

@ -6,6 +6,7 @@ set(SRCROOT ${PROJECT_SOURCE_DIR}/src/SFML/Window)
set(SRC
${SRCROOT}/Context.cpp
${INCROOT}/Context.hpp
${INCROOT}/Export.hpp
${SRCROOT}/GlContext.cpp
${SRCROOT}/GlContext.hpp
${SRCROOT}/GlResource.cpp