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

Author Topic: Setting up SFML 2.1 on XCode 5.1.1  (Read 2607 times)

0 Members and 1 Guest are viewing this topic.

Forceofaqua

  • Newbie
  • *
  • Posts: 14
    • View Profile
Setting up SFML 2.1 on XCode 5.1.1
« on: September 20, 2014, 09:00:49 pm »
I have purchased my first mac, and I'm having trouble setting up SFML with XCode as the title suggests.

I have chosen to download and install the files that came with the Clang - universal 32+64 bits (OS X 10.8+, compatible with C++11 and libc++) package.

In this package there is a readme.txt that sends you to the tutorial page on SFML.

I have followed this tutorial and installed SFML about 5 times due to this error that appears.

XCode recognized the SFML templates, but for some reason I get an error stating

Lexcial or Preprocessor Issue
'SFML/Audio.hpp' file not found with <angled> include; use "quotes" instead

and

Lexical or Preprocessor Issue
'SFML/System.hpp' file not found

Ive swiched the angled to quotes on all of the .hpp files, but xcode tells me that the files do not exit.

Ive removed the Audio.hpp include line, but the compiler spits out the same error for the next file include which is the Graphics.hpp file.

Ive also placed a copy of the SFML file that holds all of these files inside of the project folder with my main.cpp.

Has anyone run into this problem before, or have any ideas on how to fix this?

Forceofaqua

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Setting up SFML 2.1 on XCode 5.1.1
« Reply #1 on: September 21, 2014, 12:32:51 am »
Well I don't know exactly how I got it to work.

For anyone else who is in my position.

1) download "Clang - universal 32+64 bits (OS X 10.8+, compatible with C++11 and libc++)" from the SFML do
downloads page

2) download "Templates for Xcode 5" from the SFML downloads page.

3) Take all files inside of the frameworks folder in the Clang download and place them in your "library/Frameworks" folder

4) Take all files inside of the extlibs folder in the Clang download and place them in your "library/Frameworks" folder.

5) Take the SFML file from the Templates download and place them under library/Developer/Xcode/Templates/

Open a new xcode project of type sfml.app and run the template. It should work. I dont know if this way is transferable between mac's or PC's.

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: Setting up SFML 2.1 on XCode 5.1.1
« Reply #2 on: September 21, 2014, 04:12:08 am »
All this is explained in the getting started tutorial, especially n°2.  ;)

As for your last comment I'm not sure I understand it exactly but don't expect a mac app to run on a pc.
SFML / OS X developer

roxasoath

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: Setting up SFML 2.1 on XCode 5.1.1
« Reply #3 on: October 07, 2014, 09:53:14 pm »
Hi, I'm having a problem as well. I have gone through all the steps but I am getting several errors when I go to run/build the project from the tutorial. I get:


clang: error: unknown argument: '-frameworksfml-system'
clang: error: unknown argument: '-frameworksfml-window'
clang: error: unknown argument: '-frameworksfml-graphics'
clang: error: unknown argument: '-frameworksfml-audio'
clang: error: unknown argument: '-frameworksfml-network'

I've tried using the shell script install and doing the steps manually. Can someone correct my stupidity? Thanks!

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: Setting up SFML 2.1 on XCode 5.1.1
« Reply #4 on: October 07, 2014, 10:21:06 pm »
Read the tutorial, especially the red part.

I think its the third time this week I get the same message. Why don't you guys search before posting? It's so much faster for everybody...
SFML / OS X developer