SFML community forums
General => General discussions => Topic started by: macattack1459 on June 03, 2012, 05:03:35 am
-
Hi, this is my first post here so hi. I have been having trouble in that I can create applications in SFML and xcode without issue but if I try to give an application to a friend running the exact same mac OS he can't open it. Any ideas why this could be happening? I would give you the error report but he didn't send it to me. I could ask him to try running it again if it is needed.
-
Well, it's a total shot in the dark here without any more information, but does the app bundle the SFML framework? If not, and if it's not installed on his machine, it'll crash since it won't be able to load the SFML framework.
You can have him run the app from the command line and see what is printed out. Have him:
cd ApplicaitonName.app/Contents/MacOS
./ApplicaitonName
And tell you what's printed out.
-
Cornstalks is on the money!
I have no idea which version of Xcode you are using but have a look under the build rules of your target and ensure that the sfml frameworks are being copied into the app. You'll likely find that they are not. It's easy to check if they are;
Right click the app, click view package contents (or something like that) and browse into Contents > Frameworks
If frameworks does not exist, or is empty then they are not being copied.
Do a quick google on how to copy frameworks into Xcode targets, I'm fairly confident that you'll find everything you need to know :D
-
OR you use the provided templates and everything is handled for you! ;)
-
OR you use the provided templates and everything is handled for you! ;)
well, maybe the a fresh pull from git could make a difference then.
I'd like to point out that if macattack is compiling the whole thing himself, then I think he'd need to check the little checkbox next to build templates when configuring in cmake. I didn't do this before and couldn't help but wonder where the expected templates went ::)
-
This pitfall – and some others – are explained in details here : http://www.sfml-dev.org/tutorials/2.0/compile-with-cmake.php . Everyone willing to compile SFML on his own should read this tutorial in order to not lose his time.