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

Author Topic: SFML 2 for OS X comes true!  (Read 96624 times)

0 Members and 3 Guests are viewing this topic.

James

  • Newbie
  • *
  • Posts: 6
    • View Profile
SFML 2 for OS X comes true!
« Reply #135 on: March 06, 2011, 10:41:19 am »
Nice, I completely missed that.

Cheers

Kolja

  • Newbie
  • *
  • Posts: 22
    • View Profile
SFML 2 for OS X comes true!
« Reply #136 on: March 06, 2011, 02:57:44 pm »
Good to know, I had included SFML/Graphics.hpp for that.

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
SFML 2 for OS X comes true!
« Reply #137 on: March 09, 2011, 12:36:28 am »
Looks like something is wrong with the current sources if you want to compile SFML for Mac OS X 10.5 or earlier.

I've been adding this in one of the CMake files for my own purpose:
Code: [Select]
if(MACOSX)
add_definitions("-arch ppc -arch i386 -arch x86_64 --sysroot=/Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5")
endif()


But it gives these errors:
Code: [Select]
[ 20%] Building CXX object src/SFML/Window/CMakeFiles/sfml-window.dir/OSX/cg_sf_conversion.cpp.o
.../sfml2/src/SFML/Window/OSX/cg_sf_conversion.cpp: In function ‘sf::VideoMode sf::priv::ConvertCGModeToSFMode(const __CFDictionary*)’:
.../sfml2/src/SFML/Window/OSX/cg_sf_conversion.cpp:99: error: ‘CurrentMode’ was not declared in this scope
.../sfml2/src/SFML/Window/OSX/cg_sf_conversion.cpp:100: error: ‘mode’ was not declared in this scope
.../sfml2/src/SFML/Window/OSX/cg_sf_conversion.cpp: In function ‘const __CFDictionary* sf::priv::ConvertSFModeToCGMode(sf::VideoMode)’:
.../sfml2/src/SFML/Window/OSX/cg_sf_conversion.cpp:133: error: expected `)' before ‘__null’
/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:197: error: too few arguments to function ‘const __CFDictionary* CGDisplayBestModeForParameters(CGDirectDisplayID, size_t, size_t, size_t, boolean_t*)’
.../sfml2/src/SFML/Window/OSX/cg_sf_conversion.cpp:133: error: at this point in file
.../sfml2/src/SFML/Window/OSX/cg_sf_conversion.cpp: In function ‘sf::VideoMode sf::priv::ConvertCGModeToSFMode(const __CFDictionary*)’:
.../sfml2/src/SFML/Window/OSX/cg_sf_conversion.cpp:99: error: ‘CurrentMode’ was not declared in this scope
.../sfml2/src/SFML/Window/OSX/cg_sf_conversion.cpp:100: error: ‘mode’ was not declared in this scope
.../sfml2/src/SFML/Window/OSX/cg_sf_conversion.cpp: In function ‘const __CFDictionary* sf::priv::ConvertSFModeToCGMode(sf::VideoMode)’:
.../sfml2/src/SFML/Window/OSX/cg_sf_conversion.cpp:133: error: expected `)' before ‘__null’
/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:197: error: too few arguments to function ‘const __CFDictionary* CGDisplayBestModeForParameters(CGDirectDisplayID, size_t, size_t, size_t, boolean_t*)’
.../sfml2/src/SFML/Window/OSX/cg_sf_conversion.cpp:133: error: at this point in file
.../sfml2/src/SFML/Window/OSX/cg_sf_conversion.cpp: In function ‘sf::VideoMode sf::priv::ConvertCGModeToSFMode(const __CFDictionary*)’:
.../sfml2/src/SFML/Window/OSX/cg_sf_conversion.cpp:99: error: ‘CurrentMode’ was not declared in this scope
.../sfml2/src/SFML/Window/OSX/cg_sf_conversion.cpp:100: error: ‘mode’ was not declared in this scope
.../sfml2/src/SFML/Window/OSX/cg_sf_conversion.cpp: In function ‘const __CFDictionary* sf::priv::ConvertSFModeToCGMode(sf::VideoMode)’:
.../sfml2/src/SFML/Window/OSX/cg_sf_conversion.cpp:133: error: expected `)' before ‘__null’
/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:197: error: too few arguments to function ‘const __CFDictionary* CGDisplayBestModeForParameters(CGDirectDisplayID, size_t, size_t, size_t, boolean_t*)’
.../sfml2/src/SFML/Window/OSX/cg_sf_conversion.cpp:133: error: at this point in file


Switching back to the 10.6 SDK fixes this issue.
Want to play movies in your SFML application? Check out sfeMovie!

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
SFML 2 for OS X comes true!
« Reply #138 on: March 09, 2011, 12:48:48 am »
At the time I coded this I didn't have any prior 10.6 OS so I couldn't check (for some reason I wasn't able to get 10.4/5 SDK). And as you know coding without being able to compile is hard. ^^'

Unfortunately, I won't have the time to work on SFML before one month or so, sorry.
SFML / OS X developer

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
SFML 2 for OS X comes true!
« Reply #139 on: March 09, 2011, 12:55:25 am »
Ok, too bad :( .

One more thing I noticed is that the libraries you provide include the i386 and x86_64 architectures but not the ppc one. Is this on purpose?
Want to play movies in your SFML application? Check out sfeMovie!

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
SFML 2 for OS X comes true!
« Reply #140 on: March 09, 2011, 01:01:03 am »
No.

But I've to think again and chose which OS version I'll support. For example joysticks won't work in 10.4 and too much stuff are deprecated making it hard to maintain.. Also I won't ever be able to test on a 10.4 (maybe compile for 10.4 but not run on 10.4) so...

I'll keep you updated.  :wink:
SFML / OS X developer

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
SFML 2 for OS X comes true!
« Reply #141 on: March 09, 2011, 01:08:52 am »
I agree with you but... ppc doesn't mean 10.4 :o . You still have people using Mac OS X 10.5 on a PowerPC Mac :? .

But.. well.. it's more or less the same kind of decision. I suppose I'll just have to release my project for Intel Macs only for now :P (going to look when you changed cg_sf_conversion.cpp though, Mac OS X 10.6 only is a bit restrictive...).

Anyway.. thanks for your efforts on the mac port ! :)
Want to play movies in your SFML application? Check out sfeMovie!

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
SFML 2 for OS X comes true!
« Reply #142 on: March 09, 2011, 08:17:03 am »
Quote from: "Ceylo"
I agree with you but... ppc doesn't mean 10.4 :o . You still have people using Mac OS X 10.5 on a PowerPC Mac :? .
ppc will definitely be supported on 10.5.  :wink:
SFML / OS X developer

mercurio7891

  • Jr. Member
  • **
  • Posts: 89
    • View Profile
Can't seems to compile and make sfml2
« Reply #143 on: March 21, 2011, 04:47:37 pm »
Hi, today I wanted to try sfml2 mac port, and seems stuck in the installation of it.

When trying to do a "make all" I get error while building sfml-graphics.

Code: [Select]

[ 58%] Building CXX object src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/Color.cpp.o
[ 60%] Building CXX object src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/Drawable.cpp.o
[ 61%] Building CXX object src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/Font.cpp.o
In file included from /sfml2/include/SFML/System/Resource.hpp:236:0,
                 from /sfml2/include/SFML/Graphics/Font.hpp:31,
                 from /sfml2/src/SFML/Graphics/Font.cpp:28:
/sfml2/include/SFML/System/ResourcePtr.inl: In constructor 'sf::ResourcePtr< <template-parameter-1-1> >::ResourcePtr()':
/sfml2/include/SFML/System/ResourcePtr.inl:29:12: error: 'NULL' was not declared in this scope
/sfml2/include/SFML/System/ResourcePtr.inl: In member function 'void sf::ResourcePtr< <template-parameter-1-1> >::OnResourceDestroyed()':
/sfml2/include/SFML/System/ResourcePtr.inl:124:18: error: 'NULL' was not declared in this scope
make[2]: *** [src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/Font.cpp.o] Error 1
make[1]: *** [src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/all] Error 2


I have xcode4 installed, and using gcc4.6 as a compiler instead of the xcode ones.
Just in case I tested the gcc4.6 compiler it compiles alright and pass all boost regression test.

regards

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
SFML 2 for OS X comes true!
« Reply #144 on: March 21, 2011, 04:55:25 pm »
It was already fixed before you posted ;)
Laurent Gomila - SFML developer

mercurio7891

  • Jr. Member
  • **
  • Posts: 89
    • View Profile
SFML 2 for OS X comes true!
« Reply #145 on: March 21, 2011, 05:29:15 pm »
thats nice :D. How do I get the updated code with the fix? The code that I am using was downloaded from the snapshot link found on the download page. I got it a few hours ago.

regards
Dontino

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
SFML 2 for OS X comes true!
« Reply #146 on: March 21, 2011, 05:48:32 pm »
I don't know how often the snapshot is updated, but at worst tomorrow should be ok.
Laurent Gomila - SFML developer

Silvah

  • Guest
SFML 2 for OS X comes true!
« Reply #147 on: March 21, 2011, 06:00:40 pm »
If you don't want to wait for snapshot update, then just add
Code: [Select]
#include <cstddef> at the top of SFML/System/Resource.hpp ;)

mercurio7891

  • Jr. Member
  • **
  • Posts: 89
    • View Profile
SFML 2 for OS X comes true!
« Reply #148 on: March 22, 2011, 03:31:39 pm »
The program is now compiling fine, however after running it, when I quit, it always produces the error:

*** attempt to pop an unknown autorelease pool

how should I go about fixing this?? Is there some libraries I am missing??

regards

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
SFML 2 for OS X comes true!
« Reply #149 on: March 22, 2011, 07:31:58 pm »
Quote from: "mercurio7891"
The program is now compiling fine, however after running it, when I quit, it always produces the error:

*** attempt to pop an unknown autorelease pool

how should I go about fixing this?? Is there some libraries I am missing??

regards
That's a known "bug" (in fact it does nothing really bad) that cannot be fixed.
SFML / OS X developer

 

anything