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

Author Topic: Error on example build  (Read 1200 times)

0 Members and 1 Guest are viewing this topic.

cubefest

  • Newbie
  • *
  • Posts: 3
    • View Profile
Error on example build
« on: August 17, 2014, 09:26:30 pm »
I am trying to do the first build on mac osx mavericks with Xcode 5.1.1 but I keep on running into errors about this code that is supposed to just compile and work. I have looked around the internet and found the solution to my first problem which was a linker problem caused by needing to update the frameworks to be compatible with Xcode 5, but I am stuck with this most recent issue. I can't figure out what this error is from:

Undefined symbols for architecture x86_64:
  "sf::Font::loadFromFile(std::string const&)", referenced from:
      _main in main.o
  "sf::Image::loadFromFile(std::string const&)", referenced from:
      _main in main.o
  "sf::Music::openFromFile(std::string const&)", referenced from:
      _main in main.o
  "sf::String::String(char const*, std::locale const&)", referenced from:
      _main in main.o
  "sf::Texture::loadFromFile(std::string 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)

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: Error on example build
« Reply #1 on: August 17, 2014, 09:57:40 pm »
Read the red parts carefully. http://sfml-dev.org/tutorials/2.1/start-osx.php If still confused, ask but there should be plenty of similar post on this forum and SO.
SFML / OS X developer

cubefest

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Error on example build
« Reply #2 on: August 17, 2014, 10:51:41 pm »
It would seem as if it were a conflict about clang vs gcc, but I was very careful when choosing the compiler and source - I even redid it to double check. None of the red parts helped either. I think I must be missing something rather blatant, but I can't seem to find it. Also, sorry about being a newbie, I've looked at past posts and you have dealt with this kinda problem countless times it seems.

cubefest

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Error on example build
« Reply #3 on: August 17, 2014, 10:59:19 pm »
Fixed the issues. I set SFML binaries to dylib and it works. I must not have actually set up the framework correctly. Sorry for the trouble.

 

anything