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

Author Topic: [SOLVED](Thanks Hiura)Problem with examples on Mac OSX  (Read 5080 times)

0 Members and 1 Guest are viewing this topic.

Ricky

  • Jr. Member
  • **
  • Posts: 99
    • View Profile
    • Tejada
    • Email
[SOLVED](Thanks Hiura)Problem with examples on Mac OSX
« on: February 05, 2013, 05:58:20 pm »
Hey all! Long time no see. I've practiced SFML for a long time now on Windows and even Linux. It has even helped me begin to learn OpenGL. I currently have now a Mac at my disposal and I would like very much to learn how to dev on it as well. It is a totally new kettle of fish as I have discovered and XCode is frustratingly different from everything I've done in the past.

I've downloaded SFML 2.0 from the Git repo, installed Cmake and Doxygen and built the source.
I get no errors and it builds fine but the examples that use freetype or sndfile don't work.
The message the terminal gives me is this :
Quote
~ ratejada$ /Users/ratejada/Downloads/SFML-master/examples/opengl/opengl ; exit;
dyld: Library not loaded: @executable_path/../Frameworks/freetype.framework/Versions/A/freetype
Referenced from: /Users/ratejada/Downloads/SFML-master/examples/opengl/opengl
Reason: image not found
Cocoa example doesn't work either. It just opens and closes immediately without even giving an error

However the examples that only use SFML do work, like the window example with the rotating cube.

Any help? Thanks. Also, I am a TOTAL Mac noob. Last time I used it was back in high school to write papers.

Also to Mac SFML devs out there, could I get some pointers on things I should know and should be doing?

-edited typo.
« Last Edit: February 06, 2013, 02:34:21 am by Ricky »
Wilt thou yet say before him that slayeth thee, I am God? but thou shalt be a man, and no God, in the hand of him that slayeth thee.

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: Problem with examples on Mac OSX
« Reply #1 on: February 06, 2013, 01:24:34 am »
Hi !

Did you run make install ?
SFML / OS X developer

Ricky

  • Jr. Member
  • **
  • Posts: 99
    • View Profile
    • Tejada
    • Email
Re: Problem with examples on Mac OSX
« Reply #2 on: February 06, 2013, 01:45:48 am »
Thanks for replying.

I just ran make.. should I have run make install? :o
Wilt thou yet say before him that slayeth thee, I am God? but thou shalt be a man, and no God, in the hand of him that slayeth thee.

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: Problem with examples on Mac OSX
« Reply #3 on: February 06, 2013, 01:47:10 am »
Well... yes !  ;)
SFML / OS X developer

Ricky

  • Jr. Member
  • **
  • Posts: 99
    • View Profile
    • Tejada
    • Email
Re: Problem with examples on Mac OSX
« Reply #4 on: February 06, 2013, 01:54:07 am »
Ok I just ran it and apparently INSTALL failed because I don't have permission to write to that directory, is there some equivalent to sudo in mac? :D

I was pleased to find out most linux commands work on Mac! Yay for common unix things!
Wilt thou yet say before him that slayeth thee, I am God? but thou shalt be a man, and no God, in the hand of him that slayeth thee.

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: Problem with examples on Mac OSX
« Reply #5 on: February 06, 2013, 01:55:10 am »
OS X is not so from other Unixes. You can also use sudo.
SFML / OS X developer

Ricky

  • Jr. Member
  • **
  • Posts: 99
    • View Profile
    • Tejada
    • Email
Re: Problem with examples on Mac OSX
« Reply #6 on: February 06, 2013, 01:58:31 am »
Just did and it worked like a charm, thanks :)

Now another error: Failed to load font "resources/sansation.ttf"

This is the OpenGL example code.

Just checked Cocoa and it works perfect!
« Last Edit: February 06, 2013, 02:00:16 am by Ricky »
Wilt thou yet say before him that slayeth thee, I am God? but thou shalt be a man, and no God, in the hand of him that slayeth thee.

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: Problem with examples on Mac OSX
« Reply #7 on: February 06, 2013, 02:00:53 am »
How did you launch it ?

You have to be in the same directory as the binary (i.e. /usr/local/share/SFML/example/opengl and run ./opengl).
SFML / OS X developer

Ricky

  • Jr. Member
  • **
  • Posts: 99
    • View Profile
    • Tejada
    • Email
Re: Problem with examples on Mac OSX
« Reply #8 on: February 06, 2013, 02:03:13 am »
Ok I'll try launching from terminal (I've just been clicking on it the good ol' fashion Windows way xD)

Works like a charm!

Question now, how do I make apps packaged so they can just be clicked on?
Wilt thou yet say before him that slayeth thee, I am God? but thou shalt be a man, and no God, in the hand of him that slayeth thee.

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: Problem with examples on Mac OSX
« Reply #9 on: February 06, 2013, 02:04:27 am »
Double clicking it won't work because Finder doesn't set the working directory to the local folder, unfortunately.
SFML / OS X developer

Ricky

  • Jr. Member
  • **
  • Posts: 99
    • View Profile
    • Tejada
    • Email
Re: Problem with examples on Mac OSX
« Reply #10 on: February 06, 2013, 02:09:49 am »
If I want to make my app a stand alone how would I do this on Mac?
Wilt thou yet say before him that slayeth thee, I am God? but thou shalt be a man, and no God, in the hand of him that slayeth thee.

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: Problem with examples on Mac OSX
« Reply #11 on: February 06, 2013, 02:12:18 am »
If you install the Xcode 4 templates for SFML (see cmake tutorial + this post) you can create easily a new app project that will self contain SFML + other resources (e.g. images, sounds, ...).
SFML / OS X developer

Ricky

  • Jr. Member
  • **
  • Posts: 99
    • View Profile
    • Tejada
    • Email
Re: [SOLVED](Thanks Hiura)Problem with examples on Mac OSX
« Reply #12 on: February 06, 2013, 02:34:04 am »
Ok, thanks so much Hiura!
Wilt thou yet say before him that slayeth thee, I am God? but thou shalt be a man, and no God, in the hand of him that slayeth thee.

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: [SOLVED](Thanks Hiura)Problem with examples on Mac OSX
« Reply #13 on: February 06, 2013, 02:34:35 am »
you're welcome.
SFML / OS X developer