SFML community forums
Help => General => Topic started 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?
-
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.
-
I already did that, but it gives me an error about finding the files.
-
which revision of SFML 2 are you using ?
-
The Mac OS X zip file under SFML 2 in the download page, but not the installer. It's 5.1 MBs I believe.
-
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)
-
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"
-
Also, are the C++ language and dialect selections supposed to have a clang option?
-
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.
"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.
-
I'm pretty sure I installed the right one. Could you link me to the most current one just to make sure?
-
The source code is on github.
-
Yeah that's the one I got, but it still doesn't work :/