Hi!
one of my colleagues at Debian pkg-games wrote a patch for building SFML with gcc-4.6:
From: Evgeni Golov <evgeni@debian.org>
Subject: [PATCH] debian/gcc-4.6
Properly link with GCC 4.6.
#include <cstddef> everywhere.
Closes: #625031
Signed-off-by: Evgeni Golov <evgeni@debian.org>
---
include/SFML/Audio/Music.hpp | 1 +
include/SFML/Audio/Sound.hpp | 1 +
include/SFML/Audio/SoundBuffer.hpp | 1 +
include/SFML/Graphics/PostFX.hpp | 1 +
include/SFML/Graphics/RenderWindow.hpp | 1 +
include/SFML/Graphics/Sprite.hpp | 1 +
include/SFML/Graphics/String.hpp | 1 +
include/SFML/System/ResourcePtr.inl | 1 +
src/SFML/Graphics/Font.cpp | 1 +
src/SFML/Graphics/Image.cpp | 1 +
10 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/include/SFML/Audio/Music.hpp b/include/SFML/Audio/Music.hpp
index 0b8f70d..3320676 100755
--- a/include/SFML/Audio/Music.hpp
+++ b/include/SFML/Audio/Music.hpp
@@ -28,6 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
+#include <cstddef>
#include <SFML/Audio/SoundStream.hpp>
#include <string>
#include <vector>
diff --git a/include/SFML/Audio/Sound.hpp b/include/SFML/Audio/Sound.hpp
index 7cb8002..5a46481 100755
--- a/include/SFML/Audio/Sound.hpp
+++ b/include/SFML/Audio/Sound.hpp
@@ -28,6 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
+#include <cstddef>
#include <SFML/System/Resource.hpp>
#include <SFML/System/Vector3.hpp>
#include <SFML/Audio/AudioResource.hpp>
diff --git a/include/SFML/Audio/SoundBuffer.hpp b/include/SFML/Audio/SoundBuffer.hpp
index 023e5aa..2db29ad 100755
--- a/include/SFML/Audio/SoundBuffer.hpp
+++ b/include/SFML/Audio/SoundBuffer.hpp
@@ -28,6 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
+#include <cstddef>
#include <SFML/System/Resource.hpp>
#include <SFML/Audio/AudioResource.hpp>
#include <string>
diff --git a/include/SFML/Graphics/PostFX.hpp b/include/SFML/Graphics/PostFX.hpp
index c875377..be2200a 100755
--- a/include/SFML/Graphics/PostFX.hpp
+++ b/include/SFML/Graphics/PostFX.hpp
@@ -28,6 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
+#include <cstddef>
#include <SFML/Graphics/Drawable.hpp>
#include <SFML/Graphics/Image.hpp>
#include <istream>
diff --git a/include/SFML/Graphics/RenderWindow.hpp b/include/SFML/Graphics/RenderWindow.hpp
index 088e368..b2154cc 100755
--- a/include/SFML/Graphics/RenderWindow.hpp
+++ b/include/SFML/Graphics/RenderWindow.hpp
@@ -28,6 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
+#include <cstddef>
#include <SFML/Graphics/Image.hpp>
#include <SFML/Graphics/RenderTarget.hpp>
#include <SFML/Window/Window.hpp>
diff --git a/include/SFML/Graphics/Sprite.hpp b/include/SFML/Graphics/Sprite.hpp
index 9d47bb4..deb6bab 100755
--- a/include/SFML/Graphics/Sprite.hpp
+++ b/include/SFML/Graphics/Sprite.hpp
@@ -28,6 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
+#include <cstddef>
#include <SFML/System/Resource.hpp>
#include <SFML/Graphics/Drawable.hpp>
#include <SFML/Graphics/Rect.hpp>
diff --git a/include/SFML/Graphics/String.hpp b/include/SFML/Graphics/String.hpp
index b0ca81b..6b9c483 100755
--- a/include/SFML/Graphics/String.hpp
+++ b/include/SFML/Graphics/String.hpp
@@ -28,6 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
+#include <cstddef>
#include <SFML/System/Resource.hpp>
#include <SFML/System/Unicode.hpp>
#include <SFML/Graphics/Drawable.hpp>
diff --git a/include/SFML/System/ResourcePtr.inl b/include/SFML/System/ResourcePtr.inl
index dbfcd0d..7bda5f1 100755
--- a/include/SFML/System/ResourcePtr.inl
+++ b/include/SFML/System/ResourcePtr.inl
@@ -22,6 +22,7 @@
//
////////////////////////////////////////////////////////////
+#include <cstddef>
////////////////////////////////////////////////////////////
/// Default constructor
diff --git a/src/SFML/Graphics/Font.cpp b/src/SFML/Graphics/Font.cpp
index 36c4c28..350c0cc 100755
--- a/src/SFML/Graphics/Font.cpp
+++ b/src/SFML/Graphics/Font.cpp
@@ -25,6 +25,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
+#include <cstddef>
#include <SFML/Graphics/Font.hpp>
#include <SFML/Graphics/FontLoader.hpp>
#include <iostream>
diff --git a/src/SFML/Graphics/Image.cpp b/src/SFML/Graphics/Image.cpp
index 14346fb..8b18fb7 100755
--- a/src/SFML/Graphics/Image.cpp
+++ b/src/SFML/Graphics/Image.cpp
@@ -25,6 +25,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
+#include <cstddef>
#include <SFML/Graphics/Image.hpp>
#include <SFML/Graphics/ImageLoader.hpp>
#include <SFML/Graphics/RenderWindow.hpp>
--