SFML community forums

Help => General => Topic started by: MarcuzPwnz on February 27, 2013, 07:28:12 am

Title: [Mac] Weird problem with running my game on different machines
Post by: MarcuzPwnz on February 27, 2013, 07:28:12 am
Hello there SFML users! Today a friend of mine was going to test one of my games for me, it's a basic game of Pong and it runs fine on my machine, but for some reason it will not work on his or my other Mac.

It's built using SFML 2.0 ("made" using CMake for C++11 )and was compiled in Xcode and distributed as an app that can be downloaded here: http://www.mediafire.com/?ql63pdue2qm85ws

All 3 computers we have tested it on are running Mac 10.7.5 but only mine could run the game, the others got the following error: http://i.imgur.com/utQNsfI.png

Am I missing anything? Was I suppose to include some .dll (or Mac equivalent) files with the .app or something?

Compiler Info:
i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)

Thanks. :)
Title: AW: [Mac] Weird problem with running my game on different machines
Post by: eXpl0it3r on February 27, 2013, 08:15:20 am
You also have to distribute the freetype library, at least the app is looking for it, as the error describes it preceisely. ;)
Title: Re: [Mac] Weird problem with running my game on different machines
Post by: MarcuzPwnz on February 27, 2013, 09:55:09 am
Oh, very nice! So should I just get my friend to put the freetype library folder in his /Library/Frameworks directory? :)
Title: AW: [Mac] Weird problem with running my game on different machines
Post by: eXpl0it3r on February 27, 2013, 10:46:48 am
The error message tells you where the app is looking for the lib.
But I've no idea about Mac... ;)
Title: Re: [Mac] Weird problem with running my game on different machines
Post by: Acrobat on February 27, 2013, 02:29:29 pm
Just add post build event to copy freetype to Framework directory
Title: Re: [Mac] Weird problem with running my game on different machines
Post by: Gan on February 27, 2013, 03:22:36 pm
I had the same problem. Acrobat is correct. Just add a copy build event to copy the frameworks into the Frameworks folder inside the application.
If you don't know how to, I'll take screenshots of the process.
Title: Re: [Mac] Weird problem with running my game on different machines
Post by: Hiura on February 27, 2013, 05:15:33 pm
Actually, the lastest version of the templates should do that for you. Make sure you have them and not an older version. (If that's the case, you need to create the project from scratch.)
Title: Re: [Mac] Weird problem with running my game on different machines
Post by: MarcuzPwnz on February 27, 2013, 07:03:46 pm
I had the same problem. Acrobat is correct. Just add a copy build event to copy the frameworks into the Frameworks folder inside the application.
If you don't know how to, I'll take screenshots of the process.

Could you please? That would be very helpful. :)
Title: Re: [Mac] Weird problem with running my game on different machines
Post by: Gan on February 28, 2013, 08:39:14 pm
(http://cl.ly/image/3F3q1n0w042V/Screen%20Shot%202013-02-28%20at%201.38.02%20PM.png)

Click the button at the bottom right, click Copy Files. Then set it to Frameworks and add the frameworks.
Title: Re: [Mac] Weird problem with running my game on different machines
Post by: MarcuzPwnz on March 01, 2013, 03:34:40 am
I ended up just compiling the .app then showing its package contents and adding the freetype library in manually.

Thank you though. :)