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

Author Topic: SFML and XCode4.1  (Read 3089 times)

0 Members and 1 Guest are viewing this topic.

Rusty1s

  • Newbie
  • *
  • Posts: 4
    • View Profile
SFML and XCode4.1
« on: August 06, 2011, 11:12:26 pm »
Hey,

I have problems installing SFML on my mac and couldn't find an answer on this forum.

I followed this tutorial:
http://www.sfml-dev.org/tutorials/1.6/start-osx.php

But as I run XCode --> New Project --> Application I cannot see the SFML Applications, so something went wrong during installation. I did the same things named in tutorial except that some folders have different names (cause of Lion/XCode 4.1?)

Further on I couldn't find the folder "/Developer/Library/Xcode/Project Templates/Command Line Utility", so what shall I do with the SFML Tool directory?

Can someone help me?

Greetings
Rusty1s

vlag

  • Newbie
  • *
  • Posts: 10
    • View Profile
SFML and XCode4.1
« Reply #1 on: August 07, 2011, 02:38:39 pm »
Just move all SFML Template to /Developer/Library/Xcode/Templates/Project Templates/Mac/Application/

It works fine for me and XCode 4

Rusty1s

  • Newbie
  • *
  • Posts: 4
    • View Profile
SFML and XCode4.1
« Reply #2 on: August 07, 2011, 04:46:34 pm »
I did the same things the tutorial and you want me to do:

I copied /lib64/... (all 6 folders) and /extlibs/bin/x86_64/sndfile.framework to /Library/Frameworks

http://imageshack.us/f/847/screen1d.jpg/

Then I copied the 2 directories (Graphic & Window) from /build/xcode/templates to /Developer/Library/Xcode/Templates/Project Templates/Mac/Application and the SFML Tool Folder to /build/xcode/templates to /Developer/Library/Xcode/Templates/Project Templates/Mac/Application/Command Line Tool.xctemplate

http://imageshack.us/f/695/screen2dqo.jpg/

But it still doesnt work for me :(
Does it have something to do with Mac Lion?

vlag

  • Newbie
  • *
  • Posts: 10
    • View Profile
SFML and XCode4.1
« Reply #3 on: August 07, 2011, 05:45:39 pm »
Ah sorry, I had not seen you use SFML 1.6

With XCode 4, template files are now in a .xctemplate repertory.
I don't really know how it works, but it seems that the main source code is placed directly in the .plist (see the SFML 2 Template).

However, you can make a new Command Line Project and add the SFML frameworks to it, until an "official" (and temporary) template to be released

Rusty1s

  • Newbie
  • *
  • Posts: 4
    • View Profile
SFML and XCode4.1
« Reply #4 on: August 07, 2011, 10:12:13 pm »
Thanks a lot

In ended up with SFML 2.0 and followed the cmake tutorial, but i get a linker error saying:

ld: library not found for -lsfml-system-d
Command /Developer/usr/bin/clang++ failed with exit code 1

Any suggestions?

vlag

  • Newbie
  • *
  • Posts: 10
    • View Profile
SFML and XCode4.1
« Reply #5 on: August 07, 2011, 10:59:24 pm »
In the Scheme tab, clic "Edit Scheme", and set the Run "Build configuration" to Release.

But if you had this error, you probably compiled SFML on Debug configuration, so you should recompile SFML2 on Release mode too.

Don't forget to link all release .dylib you need after that

Rusty1s

  • Newbie
  • *
  • Posts: 4
    • View Profile
SFML and XCode4.1
« Reply #6 on: August 08, 2011, 12:17:08 am »
Thanks! Its all running perfectly now!