Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: XCode 4.5 Template Problem  (Read 2150 times)

0 Members and 1 Guest are viewing this topic.

Tegramon

  • Newbie
  • *
  • Posts: 9
    • View Profile
XCode 4.5 Template Problem
« on: September 26, 2012, 04:57:42 am »
Hello

I am a noob programmer and I started using SFML. I am using OS 10.8.2 with XCode 4.5.
I create a new app using the installed templates.
This is what I do.
I add the frameworks by hand, which are needed.
I go to the build settings in the target and add my "/Library/Frameworks" (without the quotes). Otherwise it cannot find the header files.
I hit compile and it compiles fine. However the linker gives me the following problems.

Undefined symbols for architecture x86_64:
  "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 x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Any idea what I am doing wrong?

P.S. Under Xcode 4.4 everything worked perfectly, I even wrote a small pong game. That project however still compiles fine.

[SOLVED]
Solved it. I needed to recompile with libstdc++. Works fine.
« Last Edit: September 26, 2012, 05:41:28 am by Tegramon »