SFML community forums
Help => General => Topic started by: programmer47 on April 14, 2012, 04:32:30 pm
-
The Mac download on the download page only has framework files for use with Xcode and templates for an old version. I have the new Xcode so I can't use the templates, and I can't figure out how to set it up manually. What I want to do is use a different IDE like Eclipse or Code::Blocks but I think they need the proper library files (dylib?) instead of the frameworks. I tried building the libraries from the latest source code of SFML 2 but I don't have a lot of the header files it needs, which is probably because of the new Xcode version not installing them. Does anyone have, or can compile, the native Mac libraries that I can use in different IDEs?
-
I have compiled and used SFML with the latest Xcode on mac, I havent tried using another IDE however but it shouldn't be a problem sense I do have the dynlib files for SFML on my computer (after compiling it).
I used cmake, just ran cmake to create unix make files (not xcode), then ran the commands "make" and "sudo make install" from the folder where they where created by cmake in the console.
Oh I hade to add a line to the CMAKE_CXX_FLAG or it would crash any program that tried to create a empty sf:string, I dont have the exact line right now.
-
Oh I hade to add a line to the CMAKE_CXX_FLAG or it would crash any program that tried to create a empty sf:string, I dont have the exact line right now.
The exact line is: "-D_GLIBCXX_FULLY_DYNAMIC_STRING=1" (without the quotes of course).
I don't know how I built it exactly, but I remember I needed the "command line tools" installed in Xcode.
You can find it in Xcode -> Preferences -> Downloads (You might need to register to download it, but it is free).
-
I have compiled and used SFML with the latest Xcode on mac, I havent tried using another IDE however but it shouldn't be a problem sense I do have the dynlib files for SFML on my computer (after compiling it).
I used cmake, just ran cmake to create unix make files (not xcode), then ran the commands "make" and "sudo make install" from the folder where they where created by cmake in the console.
Oh I hade to add a line to the CMAKE_CXX_FLAG or it would crash any program that tried to create a empty sf:string, I dont have the exact line right now.
I tried this but I get compiler errors because of missing header files. I did find someone else with this problem but they had no solution. I even redownloaded and installed Xcode again, but it made no difference. Could you upload the generated files?
-
SFML 2.0 RC will be available in a (very) few days. If you can wait until this release then you will be able to download an installer which will give you everything you need to use SFML on Mac.
However, if you want to use Eclipse for C++ development I must warn you : this IDE is not very good for this language. Regarding to Codeblocks : I've always end up having trouble with this IDE on Mac (not starting and stuff like that). So I still recommend Xcode on Mac OS X. Moreover, all Apple developer tools come with this application and not having Xcode can be an issue (not having some SDK – it's probably the reason of your missing headers – etc...).
Now, if you still want to use Codeblocks or Eclipse (or any IDE or any autotool or whatever) you don't need dylibs : frameworks work just fine. You only have to configure these tools to use them.
-
SFML 2.0 RC will be available in a (very) few days. If you can wait until this release then you will be able to download an installer which will give you everything you need to use SFML on Mac.
However, if you want to use Eclipse for C++ development I must warn you : this IDE is not very good for this language. Regarding to Codeblocks : I've always end up having trouble with this IDE on Mac (not starting and stuff like that). So I still recommend Xcode on Mac OS X. Moreover, all Apple developer tools come with this application and not having Xcode can be an issue (not having some SDK – it's probably the reason of your missing headers – etc...).
Now, if you still want to use Codeblocks or Eclipse (or any IDE or any autotool or whatever) you don't need dylibs : frameworks work just fine. You only have to configure these tools to use them.
I'll wait until the 2.0 release then, which will hopefully work with the newest Xcode. I didn't know I could use frameworks with other IDEs, I thought they were specific to Xcode, but the only reason I didn't want to use Xcode was because of the templates not working. Thanks very much :)
-
Note : if you want to use SFML 1.6 with Xcode 4 you can. The templates don't work but that's it. See this discussion (http://en.sfml-dev.org/forums/index.php?topic=7518.msg49582#msg49582) for more information.
-
I got missing header files when I had BUILD_DOC checked, removed the check and it worked, forgot about that one.
Thats the line I add to add texus, I didn't have it handy when posting before.
-
I 've managed to get the missing header files now. It was because I was using an unofficial version of Xcode's command line tools (I didn't want to sign up for a dev ID) but it didn't have the latest headers because of licence issues. I signed up for an ID in the end and download the official Xcode command command line tools and it worked :D I'll wait for the SFML 2.0 releasefor the new Xcode templates before I start coding.
-
I'll wait for the SFML 2.0 releasefor the new Xcode templates before I start coding.
SFML 2.0 RC has just been released ;)