SFML community forums

Help => General => Topic started by: The Terminator on February 18, 2013, 11:14:46 pm

Title: Cmake with Xcode 4.6
Post by: The Terminator 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?
Title: Re: Cmake with Xcode 4.6
Post by: Gan 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.
Title: Re: Cmake with Xcode 4.6
Post by: The Terminator on February 19, 2013, 02:09:47 am
I already did that, but it gives me an error about finding the files.
Title: Re: Cmake with Xcode 4.6
Post by: Hiura on February 19, 2013, 12:29:49 pm
which revision of SFML 2 are you using ?
Title: Re: Cmake with Xcode 4.6
Post by: The Terminator 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.
Title: Re: Cmake with Xcode 4.6
Post by: Hiura on February 19, 2013, 02:51:30 pm
ok, you should get the last source from git and compile+install them. why ? (http://en.sfml-dev.org/forums/index.php?topic=10394.msg71564#msg71564)
Title: Re: Cmake with Xcode 4.6
Post by: The Terminator 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"

Title: Re: Cmake with Xcode 4.6
Post by: The Terminator on February 21, 2013, 12:35:39 am
Also, are the C++ language and dialect selections supposed to have a clang option?
Title: Re: Cmake with Xcode 4.6
Post by: Hiura 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.

Title: Re: Cmake with Xcode 4.6
Post by: The Terminator 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?
Title: Re: Cmake with Xcode 4.6
Post by: Hiura on February 28, 2013, 10:50:57 am
The source code is on github.
Title: Re: Cmake with Xcode 4.6
Post by: The Terminator on February 28, 2013, 08:25:44 pm
Yeah that's the one I got, but it still doesn't work :/