SFML community forums
Help => General => Topic started by: feldspar on October 04, 2014, 01:10:13 am
-
Hello, I'm new to this forum and to C++/SFML. I was having a similar problem as this thread: http://en.sfml-dev.org/forums/index.php?topic=16395.0, and wasn't sure if I should create a new post or resurrect that one, since it's only about a week old.
I followed the instructions on the SFML tutorial and downloaded the command line tools. I downloaded the SDK and put the content of Frameworks in library/frameworks (although I had to create the folder). I copied the listed dependencies into the same folder. I copied the Templates into the Templates folder (which I also had to create) then I created a new project with all the settings it told me to choose. Whenever I try to build I always get the error.
I was having the same clang errors as the OP in the other thread, with an unknown argument for system, window, graphics, etc. I downloaded the new version of the templates (as somebody in that thread suggested), and that fixed that error, but now when I try to run it I get only one error that says: "Apple Mach-O Linker (id) Error", "ld: framework not found sfml-system", and "clang: error: linker command failed with exit code 1"
I am using Xcode 6 and OS X 10.9.4
Also, I don't know if this is important, but on the SFML install tutorial it shows a image of the Xcode window with all the resource and code files on the left hand tab. Mine looks exactly the same except I have no Frameworks folder beneath Supporting Files.
-
check your install; you probably haven't copied everything / copied it to the right folder.
-
I redownloaded and placed all my files, according exactly to the install tutorial. I put the contents of Frameworks in MyName/Library/frameworks, I put the SFML dependencies in the same folder, and I downloaded the xcode 5 templates and put them in MyName/Library/Developer/Xcode/Templates. Nothing changed. Anything I missed or any other ideas?
-
I put the contents of Frameworks in MyName/Library/frameworks
That's not what the tutorial instructs to do.
-
My apologies, I assumed that library/frameworks meant THE main library folder. Where is it supposed to go?
-
The tutorial says /Library/Frameworks. There's only one folder called that way.
-
ohhh, I see and have fixed the problem. Thank you very much!
-
I have the exact same issue as OP however have for sure got the files in the right /Library/Frameworks folder, the templates in the Developer/Xcode/Templates folder.
As well as these two steps:
dylib
Copy the content of lib to /usr/local/lib and copy the content of include to /usr/local/include.
SFML needs only two external libraries on Mac OS X. Copy sndfile.framework and freetype.framework from extlibs to /Library/Frameworks.
Still have the same errors, absolutely lost, Hiura or Feldspar could point me in the right direction or something else to double check/look at?
EDIT: Seems I have a little bit of a different issue, it doesn't say framework not found but
ld: file too small (length=0) file '/Library/Frameworks/sfml-system.framework/sfml-system' for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
----
ld: file too small (length=0) file '/Library/Frameworks/sfml-window.framework/sfml-window' for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
EDIT2:
Fixed it, see http://en.sfml-dev.org/forums/index.php?topic=16664.0