Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Patch for gcc-4.6  (Read 2077 times)

0 Members and 1 Guest are viewing this topic.

christoph

  • Full Member
  • ***
  • Posts: 102
    • View Profile
    • http://www.christoph-egger.org
Patch for gcc-4.6
« on: May 17, 2011, 12:42:35 am »
Hi!

one of my colleagues at Debian pkg-games wrote a patch for building SFML with gcc-4.6:

Code: [Select]

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>
--


Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Patch for gcc-4.6
« Reply #1 on: May 17, 2011, 08:02:00 am »
Thank you very much, but... SFML 1.6 is not maintained anymore, all the efforts are focused on SFML 2 now.
Laurent Gomila - SFML developer

 

anything