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

Author Topic: Mac OS X installation  (Read 4380 times)

0 Members and 1 Guest are viewing this topic.

fila_almeida

  • Newbie
  • *
  • Posts: 1
    • View Profile
Mac OS X installation
« on: February 09, 2008, 04:28:27 pm »
Hello,

I'm new to SFML, and I would really like to know how to install it on Mac OS X! I have leopard version :)

Thanks in advance

kullerhamPster

  • Newbie
  • *
  • Posts: 40
    • View Profile
Mac OS X installation
« Reply #1 on: March 24, 2008, 04:15:52 pm »
I'm trying to get SFML working under OS X (10.4), too. I managed to compile a simple SFML Test application now, but I'm not sure if the way I did it is correct or if there is a simpler way.

What I did is the following:
1. I downloaded and extracted the SDK and then copied it to a suitable location (e.g. ~/Programming/SFML).
2. I opened the Xcode projects found in the xcode subfolder and built them. This creates libraries for all the parts of SFML (Windowing, Graphics, and so on).
3. I created a new project in Xcode, a simple C++ Console Utility or however this is called. This creates only a minimal project with a "main.cpp"
4. I the project settings, I added the include-directory within the SFML directory both to "Header Search Paths" and "User Header Search Path". I think the former would have been sufficient, but I tried the latter (i.e. the user path) first, and that alone didn't work.
5. I added the self-compiled SFML-libraries to the Xcode Project (Choosing Project -> Add to project)
6. Finally, I added both the AGL and the Cocoa Framework in the same way. Both frameworks can be found in /System/Library/Frameworks.

I'm not sure if all that stuff works with 10.5. In another thread, someone wrote that he was not able to compile the Xcode projects that come along with the SDK. In that case, you might try to add the libraries that can be found in the "lib" subdir within the SFML folder instead of the self-compiled ones.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Mac OS X installation
« Reply #2 on: March 24, 2008, 05:15:18 pm »
Quote
I managed to compile a simple SFML Test application now, but I'm not sure if the way I did it is correct or if there is a simpler way.

AFAIK, it looks good :)

Please note that the MacOS port is alive again. It will be completely rewritten to use Cocoa instead of Carbon, and all the project files and installation tutorials will be provided :)
Everything should be ready in a few weeks of months.
Laurent Gomila - SFML developer

kullerhamPster

  • Newbie
  • *
  • Posts: 40
    • View Profile
Mac OS X installation
« Reply #3 on: March 24, 2008, 05:53:27 pm »
Quote from: "Laurent"
Quote
I managed to compile a simple SFML Test application now, but I'm not sure if the way I did it is correct or if there is a simpler way.

AFAIK, it looks good :)

Please note that the MacOS port is alive again. It will be completely rewritten to use Cocoa instead of Carbon, and all the project files and installation tutorials will be provided :)
Everything should be ready in a few weeks of months.


That's good news. :)

So the current Mac OS X implementation uses Carbon, not Cocoa? I'm just wondering why adding the Cocoa Framework to my application made it work. Perhaps I should try if it works with the Carbon Framework instead, too.

kullerhamPster

  • Newbie
  • *
  • Posts: 40
    • View Profile
Mac OS X installation
« Reply #4 on: March 24, 2008, 07:06:08 pm »
Seems as if my build configuration was not completeley successful. While I can compile all the stuff with "Debug" settings, building the "Release" configuration fails with tons of unknown symbols.
I have no idea why, the project settings I made were for both configs.

EDIT: Now, after asking Google, it seems to work. The "Debug" mode seems to have the so-called "ZeroLink" Option enabled by default, which resolves some symbols at runtime.
I had to had Carbon, OpenGL, and IOKit. Additionally, the self-compiled SFML libs also had some problems with unresolved symbols with the Clock class. It works with the pre-compiled libs.

Yet, I am not sure if it was a good idea to only use such a simple console application as basis: All keyboard input seems to go directly to the console instead of the application window.

 

anything