Bienvenue, Invité. Merci de vous connecter ou de vous inscrire.
Avez-vous perdu votre e-mail d'activation ?

Auteur Sujet: Problème Compilation SFML OS X avec GCC4.9  (Lu 1319 fois)

0 Membres et 1 Invité sur ce sujet

AlphaPi

  • Newbie
  • *
  • Messages: 1
    • Voir le profil
Problème Compilation SFML OS X avec GCC4.9
« le: Juillet 14, 2014, 10:24:50 pm »
Bonsoir,

je vous fais part d'un problème que j'ai rencontré lors de l'installation de la SFML 2.1 disponible sur votre site.
En effet pour diverses raisons, je n'utilise pas le compilateur par défaut sur mon OS X 10.9 à savoir clang ; j'utilise gcc4.9 que j'ai installé via macport.
Dans un premier temps j'effectue cette commande qui me renvoie ce résultat, ce qui semble normal :

iMac-de-XXX-2:build toto$ cmake .. -DCMAKE_CXX_COMPILER=g++-mp-4.9
-- The C compiler identification is AppleClang 5.1.0.5030040
-- The CXX compiler identification is GNU 4.9.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Checking whether CXX compiler has -isysroot
-- Checking whether CXX compiler has -isysroot - yes
-- Checking whether CXX compiler supports OSX deployment target flag
-- Checking whether CXX compiler supports OSX deployment target flag - yes
-- Check for working CXX compiler: /opt/local/bin/g++-mp-4.9
-- Check for working CXX compiler: /opt/local/bin/g++-mp-4.9 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found OpenGL: /System/Library/Frameworks/OpenGL.framework 
-- Found Freetype: /Users/toto/Desktop/SFML-2.1/extlibs/libs-osx/Frameworks/freetype.framework (found version "2.4.11")
-- Found GLEW: /Users/toto/Desktop/SFML-2.1/extlibs/libs-osx/lib/libGLEW.a 
-- Found JPEG: /Users/toto/Desktop/SFML-2.1/extlibs/libs-osx/lib/libjpeg.a 
-- Found OpenAL: /System/Library/Frameworks/OpenAL.framework 
-- Found SNDFILE: /Users/toto/Desktop/SFML-2.1/extlibs/libs-osx/Frameworks/sndfile.framework 
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/toto/Desktop/SFML-2.1/build

c'est lors de la compilation que les choses se compliquent :

iMac-de-XXX-2:build toto$ make
Scanning dependencies of target sfml-system
[  1%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Clock.cpp.o
[  2%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Err.cpp.o
[  3%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Lock.cpp.o
[  4%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Mutex.cpp.o
[  5%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Sleep.cpp.o
[  6%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/String.cpp.o
[  7%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Thread.cpp.o
[  9%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/ThreadLocal.cpp.o
[ 10%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Time.cpp.o
[ 11%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Unix/ClockImpl.cpp.o
[ 12%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Unix/MutexImpl.cpp.o
[ 13%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Unix/SleepImpl.cpp.o
[ 14%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Unix/ThreadImpl.cpp.o
[ 15%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Unix/ThreadLocalImpl.cpp.o
Linking CXX shared library ../../../lib/libsfml-system.dylib
[ 15%] Built target sfml-system
Scanning dependencies of target sfml-window
[ 17%] Building CXX object src/SFML/Window/CMakeFiles/sfml-window.dir/Context.cpp.o
[ 18%] Building CXX object src/SFML/Window/CMakeFiles/sfml-window.dir/GlContext.cpp.o
[ 19%] Building CXX object src/SFML/Window/CMakeFiles/sfml-window.dir/GlResource.cpp.o
[ 20%] Building CXX object src/SFML/Window/CMakeFiles/sfml-window.dir/Joystick.cpp.o
[ 21%] Building CXX object src/SFML/Window/CMakeFiles/sfml-window.dir/JoystickManager.cpp.o
[ 22%] Building CXX object src/SFML/Window/CMakeFiles/sfml-window.dir/Keyboard.cpp.o
[ 23%] Building CXX object src/SFML/Window/CMakeFiles/sfml-window.dir/Mouse.cpp.o
[ 25%] Building CXX object src/SFML/Window/CMakeFiles/sfml-window.dir/VideoMode.cpp.o
[ 26%] Building CXX object src/SFML/Window/CMakeFiles/sfml-window.dir/Window.cpp.o
[ 27%] Building CXX object src/SFML/Window/CMakeFiles/sfml-window.dir/WindowImpl.cpp.o
[ 28%] Building CXX object src/SFML/Window/CMakeFiles/sfml-window.dir/OSX/cpp_objc_conversion.mm.o
[ 29%] Building CXX object src/SFML/Window/CMakeFiles/sfml-window.dir/OSX/cg_sf_conversion.cpp.o
[ 30%] Building CXX object src/SFML/Window/CMakeFiles/sfml-window.dir/OSX/InputImpl.mm.o
/Users/toto/Desktop/SFML-2.1/src/SFML/Window/OSX/InputImpl.mm: In function 'SFOpenGLView* sf::priv::getSFOpenGLViewFromSFMLWindow(const sf::Window&)':
/Users/toto/Desktop/SFML-2.1/src/SFML/Window/OSX/InputImpl.mm:79:30: error: expected ';' before 'in'
         for (NSView* subview in subviews) {
                              ^
/Users/toto/Desktop/SFML-2.1/src/SFML/Window/OSX/InputImpl.mm:79:30: error: 'in' was not declared in this scope
/Users/toto/Desktop/SFML-2.1/src/SFML/Window/OSX/InputImpl.mm:79:33: error: expected ';' before 'subviews'
         for (NSView* subview in subviews) {
                                 ^
make[2]: *** [src/SFML/Window/CMakeFiles/sfml-window.dir/OSX/InputImpl.mm.o] Error 1
make[1]: *** [src/SFML/Window/CMakeFiles/sfml-window.dir/all] Error 2
make: *** [all] Error 2

J'ai effectué le teste avec GCC4.8 mais j'ai la même erreur. Savez-vous comment je pourrais régler ce problème à part choisir clang comme compilateur ?

 

anything