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

Author Topic: Cmake with Xcode 4.6  (Read 4193 times)

0 Members and 1 Guest are viewing this topic.

The Terminator

  • Full Member
  • ***
  • Posts: 224
  • Windows and Mac C++ Developer
    • View Profile
Cmake with Xcode 4.6
« on: February 18, 2013, 11:14:46 pm »
Hi there, I successfully compiled SFML 2.0 with Xcode 4.6. However, when I load a project through the template, it gives me an error that says: "/Users/PeterSenyszyn/Documents/Test/Test/main.cpp:1:10: 'SFML/Graphics.hpp' file not found"

Do I have to do anything beyond compile SFML with Cmake? Do I have to go ahead and link the libraries, and if so, how would I do that?
Current Projects:
Technoport

Gan

  • Jr. Member
  • **
  • Posts: 98
    • View Profile
Re: Cmake with Xcode 4.6
« Reply #1 on: February 19, 2013, 12:21:46 am »
Yeah, SFML 2.0 compilation with Xcode is borked.

You gotta do CMake for Unix Makefiles. Then in terminal cd to the folder and run sudo make install.

The Terminator

  • Full Member
  • ***
  • Posts: 224
  • Windows and Mac C++ Developer
    • View Profile
Re: Cmake with Xcode 4.6
« Reply #2 on: February 19, 2013, 02:09:47 am »
I already did that, but it gives me an error about finding the files.
Current Projects:
Technoport

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: Cmake with Xcode 4.6
« Reply #3 on: February 19, 2013, 12:29:49 pm »
which revision of SFML 2 are you using ?
SFML / OS X developer

The Terminator

  • Full Member
  • ***
  • Posts: 224
  • Windows and Mac C++ Developer
    • View Profile
Re: Cmake with Xcode 4.6
« Reply #4 on: February 19, 2013, 01:38:15 pm »
The Mac OS X zip file under SFML 2 in the download page, but not the installer. It's 5.1 MBs I believe.
Current Projects:
Technoport

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: Cmake with Xcode 4.6
« Reply #5 on: February 19, 2013, 02:51:30 pm »
ok, you should get the last source from git and compile+install them. why ?
SFML / OS X developer

The Terminator

  • Full Member
  • ***
  • Posts: 224
  • Windows and Mac C++ Developer
    • View Profile
Re: Cmake with Xcode 4.6
« Reply #6 on: February 21, 2013, 12:32:51 am »
Ok, I just did and compiled it. Now, I linked the SFML.framework file that was made and I get a new error. It's: "ld: framework not found sfml-system"

Current Projects:
Technoport

The Terminator

  • Full Member
  • ***
  • Posts: 224
  • Windows and Mac C++ Developer
    • View Profile
Re: Cmake with Xcode 4.6
« Reply #7 on: February 21, 2013, 12:35:39 am »
Also, are the C++ language and dialect selections supposed to have a clang option?
Current Projects:
Technoport

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: Cmake with Xcode 4.6
« Reply #8 on: February 21, 2013, 02:18:18 pm »
Quote
I linked the SFML.framework

you don't need to do that. SFML.framework only contains headers. You need to link against the used modules, though. But the templates do that for you.

Quote
"ld: framework not found sfml-system"
You probably installed the dylib version. Check out the cmake tutorial again.

Also, are the C++ language and dialect selections supposed to have a clang option?
They directly choose the correct compiler according to your language/dialect. But are you sure you're using the last templates ? Because them explicitly show what you'll get.

SFML / OS X developer

The Terminator

  • Full Member
  • ***
  • Posts: 224
  • Windows and Mac C++ Developer
    • View Profile
Re: Cmake with Xcode 4.6
« Reply #9 on: February 27, 2013, 10:52:19 pm »
I'm pretty sure I installed the right one. Could you link me to the most current one just to make sure?
Current Projects:
Technoport

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: Cmake with Xcode 4.6
« Reply #10 on: February 28, 2013, 10:50:57 am »
The source code is on github.
SFML / OS X developer

The Terminator

  • Full Member
  • ***
  • Posts: 224
  • Windows and Mac C++ Developer
    • View Profile
Re: Cmake with Xcode 4.6
« Reply #11 on: February 28, 2013, 08:25:44 pm »
Yeah that's the one I got, but it still doesn't work :/
Current Projects:
Technoport