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

Author Topic: Pre-compiled Mac libraries?  (Read 3709 times)

0 Members and 1 Guest are viewing this topic.

programmer47

  • Newbie
  • *
  • Posts: 12
    • View Profile
Pre-compiled Mac libraries?
« 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?

Erebus

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Pre-compiled Mac libraries?
« Reply #1 on: April 14, 2012, 04:49:05 pm »
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.

texus

  • Hero Member
  • *****
  • Posts: 501
    • View Profile
    • TGUI
    • Email
Re: Pre-compiled Mac libraries?
« Reply #2 on: April 14, 2012, 04:54:44 pm »
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).
TGUI: C++ SFML GUI

programmer47

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Pre-compiled Mac libraries?
« Reply #3 on: April 14, 2012, 05:46:32 pm »
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?

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: Pre-compiled Mac libraries?
« Reply #4 on: April 14, 2012, 07:24:12 pm »
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.
« Last Edit: April 14, 2012, 07:25:43 pm by Hiura »
SFML / OS X developer

programmer47

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Pre-compiled Mac libraries?
« Reply #5 on: April 14, 2012, 07:41:19 pm »
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 :)

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: Pre-compiled Mac libraries?
« Reply #6 on: April 14, 2012, 07:45:52 pm »
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 for more information.
SFML / OS X developer

Erebus

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Pre-compiled Mac libraries?
« Reply #7 on: April 14, 2012, 07:56:24 pm »
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.

programmer47

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Pre-compiled Mac libraries?
« Reply #8 on: April 15, 2012, 02:54:35 pm »
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.

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
Re: Pre-compiled Mac libraries?
« Reply #9 on: April 15, 2012, 03:10:47 pm »
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 ;)
Want to play movies in your SFML application? Check out sfeMovie!

 

anything