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

Author Topic: SFML Xcode Weirdness  (Read 3013 times)

0 Members and 1 Guest are viewing this topic.

macattack1459

  • Newbie
  • *
  • Posts: 3
    • View Profile
SFML Xcode Weirdness
« 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.

Cornstalks

  • Full Member
  • ***
  • Posts: 180
    • View Profile
    • My Website
Re: SFML Xcode Weirdness
« Reply #1 on: June 03, 2012, 07:29:03 am »
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.

capz

  • Newbie
  • *
  • Posts: 29
    • View Profile
Re: SFML Xcode Weirdness
« Reply #2 on: June 08, 2012, 04:59:04 am »
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

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: SFML Xcode Weirdness
« Reply #3 on: June 08, 2012, 09:31:43 am »
OR you use the provided templates and everything is handled for you!  ;)
SFML / OS X developer

capz

  • Newbie
  • *
  • Posts: 29
    • View Profile
Re: SFML Xcode Weirdness
« Reply #4 on: June 08, 2012, 02:28:25 pm »
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  ::)

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: SFML Xcode Weirdness
« Reply #5 on: June 08, 2012, 02:44:36 pm »
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.
SFML / OS X developer