SFML community forums
Help => General => Topic started by: falconmick on November 27, 2012, 02:47:47 pm
-
Xcode can't find any of the sfml-system' stuff and I have no idea how to use mac's (well no idea compaired to linux or windows) I had to use terminal just so I could sniff around the back end of the hard drive looking for where it installed SFML (couldn't find it in the end)
=.= the old mac I used to use was easier to use, the explorer actually let u explore the root of the hdd
how can I fix
ld: library not found for -lsfml-system-d
-
I've no idea about Macs either, but have you been following strictly the official tutorial?
If you do it correctly with Xcode everything should work out fine. ;)
-
well, i've changed to framework, add search paths and now I'm getting the following:
Undefined symbols for architecture i386:
"sf::RenderWindow::RenderWindow(sf::VideoMode, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned int, sf::ContextSettings const&)", referenced from:
_main in main.o
"sf::Font::loadFromFile(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
_main in main.o
"sf::Music::openFromFile(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
_main in main.o
"sf::String::String(char const*, std::__1::locale const&)", referenced from:
_main in main.o
"sf::Texture::loadFromFile(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, sf::Rect<int> const&)", referenced from:
_main in main.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
=.= I know nothing about xcode waah
-
Compiling for xcode doesn't work out of the box. First you need to install the FreeType framework from http://www.kyngchaos.com/software/frameworks
Then the current xcode project uses debug libraries.. which you have to build yourself, or you can remove the -d for all of the libraries in the project settings file so it builds with the release libraries. Instead of sfml-system-d use sfml-system.
This method is if you're using the dylib libraries for sfml 2.0 . I haven't tried the .framework yet.
I can't remember anything else I did, but if you're still having problems then post them and I'll help you.
-
To fix this issue you will need to change the compiler settings within Xcode. This is somewhat referenced in the setup tutorial http://www.sfml-dev.org/tutorials/2.0/start-osx.php (http://www.sfml-dev.org/tutorials/2.0/start-osx.php) eXpl0it3r mentioned. The specific section is in the introduction section under the C++11 subsection. However I will admit it that the tutorial does not work out of the box as it seems Xcode sets the default C++ Standard Library to custom version Apple ships with Xcode. Let me know If I am wrong on this point.
Anyway, to the meat of the matter. To fix this issue please follow these steps:
1. Go to the Build Settings for you project
2. Go to the Apple LLVM compiler 4.1 - Language section
3. You will see a C++ Standard Library option. There will be three options here and you want to choose Compiler Default
I included a screenshot so you can see where this is incase you are unsure if you are on the proper screen. Let me know if this helps.
[attachment deleted by admin]