SFML community forums
Help => General => Topic started by: confused on May 17, 2012, 09:21:08 pm
-
Tried to follow the tutorial on using SFML with Xcode. I used the wizard, opened an SFML project in Xcode, tried to run it and got the following error:
ld: library not found for -lsfml-system-d
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Was I supposed to use CMake? I tried doing that, but I couldn't follow the tutorial at all. I didn't have the "CMakeLists.txt" anywhere in the SFML stuff.
-
the templates provided by the wizard contain a mistake. It is already fixed; see https://github.com/SFML/SFML/issues/212 .
You can get the template from the git repository and install them manually to fix the issue (and, of course, create a new project).
-
I downloaded the templates and moved them to /Library/Developer/Xcode where I replaced the old Templates folder with the one, but the option for SFML doesn't come up when creating a new project.
-
Are you sure /Library/Developer/Xcode/Templates/SFML folder exists ?
What does $ find /Library/Developer/Xcode/Templates -type d prints ?
-
I don't think I made another folder for SMFL.
This is what it printed:
/Library/Developer/Xcode/Templates
/Library/Developer/Xcode/Templates/File Templates
/Library/Developer/Xcode/Templates/File Templates/C and C++
/Library/Developer/Xcode/Templates/File Templates/C and C++/C++ Class.xctemplate
/Library/Developer/Xcode/Templates/File Templates/C and C++/C++ Class.xctemplate/None
/Library/Developer/Xcode/Templates/File Templates/C and C++/C++ Class.xctemplate/Private
/Library/Developer/Xcode/Templates/File Templates/C and C++/C++ Class.xctemplate/Protected
/Library/Developer/Xcode/Templates/File Templates/C and C++/C++ Class.xctemplate/Public
-
Well, this 'SFML' folder isn't there for nothing. ;)
Copy SFML directory from templates/root/Library/Developer/Xcode/Templates to /Library/Developer/Xcode/Templates (if needed create the folder arborescence).
-
Oh. I was going off of
"In order to use these templates in Xcode 4 copy the Templates folder to /Library/Developer/Xcode. Create the destination folder if needed."
from the github page.
I created the new folder so now the path is /Library/Developer/Xcode/Templates/SFML, but it didn't help. When I put the folder under Xcode originally I replaced a folder named "Templates" with the one from github. I'm guessing this is the problem.
-
https://github.com/mantognini/Xcode-4-Templates#install is not related to SFML.
https://github.com/SFML/SFML/blob/76e04a8d00cae47d2fa0dc8b355284e032da54b1/tools/xcode/templates/readme.txt#L14-19 is related to SFML.
Both can cohabit on your system. Just merge the two folders.
-
I'm saying that I took the github folder, dragged it into the /Library/Developer/Xcode folder, and replaced the already existing Templates folder.
-
Whew. Fixed it. I just ran the install wizard again and moved the folders where I thought they belonged and now everything works.
-
Apparently (*) you took the templates folder from the wrong repository. Make sure you copy the one from here : https://github.com/SFML/SFML/tree/master/tools/xcode .
(*) based on :
"In order to use these templates in Xcode 4 copy the Templates folder to /Library/Developer/Xcode. Create the destination folder if needed."
from the github page.
(you read the wrong page)
and
/Library/Developer/Xcode/Templates
/Library/Developer/Xcode/Templates/File Templates
/Library/Developer/Xcode/Templates/File Templates/C and C++
/Library/Developer/Xcode/Templates/File Templates/C and C++/C++ Class.xctemplate
/Library/Developer/Xcode/Templates/File Templates/C and C++/C++ Class.xctemplate/None
/Library/Developer/Xcode/Templates/File Templates/C and C++/C++ Class.xctemplate/Private
/Library/Developer/Xcode/Templates/File Templates/C and C++/C++ Class.xctemplate/Protected
/Library/Developer/Xcode/Templates/File Templates/C and C++/C++ Class.xctemplate/Public
You should have (at least) :
$ find /Library/Developer/Xcode/Templates -type d
/Library/Developer/Xcode/Templates
/Library/Developer/Xcode/Templates/SFML
/Library/Developer/Xcode/Templates/SFML/SFML Application Base.xctemplate
/Library/Developer/Xcode/Templates/SFML/SFML Application.xctemplate
/Library/Developer/Xcode/Templates/SFML/SFML Command Line Tool Base.xctemplate
/Library/Developer/Xcode/Templates/SFML/SFML Command Line Tool.xctemplate