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

Author Topic: I can't compile git version of SFML on Mac OS X 10.7.5, what should I do?  (Read 2755 times)

0 Members and 1 Guest are viewing this topic.

MekaGem

  • Newbie
  • *
  • Posts: 1
    • View Profile
When I was using just only SFML, I didn't have any problems because the rc version from the site works fine. But later, I found SFGUI library, and unfortunately, it doesn't have binary libs for OS X. And that's naturally, because SFGUI needs the newest version of SFML(just from git repo, and they say in readme that it doesn't compile with rc).
So, I must have my own SFML compiled from git source, but I can't compile it!

If I do it with mp-gcc47(macports) or gcc-4.8(the latiest snapshot of gcc) it says me this:

[ 29%] Building CXX object src/SFML/Window/CMakeFiles/sfml-window.dir/OSX/cpp_objc_conversion.mm.o
In file included from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:120:0,
                 from /Users/mekagem/SFML/src/SFML/Window/OSX/cpp_objc_conversion.h:31,
                 from /Users/mekagem/SFML/src/SFML/Window/OSX/cpp_objc_conversion.mm:31:
/System/Library/Frameworks/Foundation.framework/Headers/NSTask.h:75:24: ошибка: expected unqualified-id before «^» token
 @property (copy) void (^terminationHandler)(NSTask *) NS_AVAILABLE(10_7, NA);
                        ^
/System/Library/Frameworks/Foundation.framework/Headers/NSTask.h:75:24: ошибка: expected «)» before «^» token
make[2]: *** [src/SFML/Window/CMakeFiles/sfml-window.dir/OSX/cpp_objc_conversion.mm.o] Error 1
make[1]: *** [src/SFML/Window/CMakeFiles/sfml-window.dir/all] Error 2
make: *** [all] Error 2
 

And with default apple compiler it works! But! I really need c++0x features. And if I compile my project with apple compiler, then I get expected result: it doesn't know anything about c++0x.
I was trying to use clang and libraries builded corretly, but my project didn't. Again, that's all because of c++0x.
So, what can I do with this problem? I really want to have an OS X version of my project.

P.S. On linux it compiles and works fine, without any problems. And I guess, that it only depends on Window/OSX.

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: I can't compile git version of SFML on Mac OS X 10.7.5, what should I do?
« Reply #1 on: November 20, 2012, 04:39:00 pm »
I don't know about non-official compiler. But you can have a look at http://www.sfml-dev.org/tutorials/2.0/start-osx.php to get general information how to compile SFML with clang and C++11 support.
SFML / OS X developer