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

Author Topic: Undefined references to everything outside of the core package.  (Read 2249 times)

0 Members and 2 Guests are viewing this topic.

Colecf

  • Newbie
  • *
  • Posts: 3
    • View Profile
I'm trying to get SFML to build on a Mac OS 10.8.4 with Xcode 4.6.3. I just downloaded the mac binaries and ran install.sh. Opening xcode and selecting the Application template doesn't build. I get these errors:

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)

I've tried adding the other frameworks to the project but it doesn't fix the error. Is it just me or is the framework broken?

Colecf

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Undefined references to everything outside of the core package.
« Reply #1 on: August 23, 2013, 11:21:56 pm »
I won't bump anymore if noone can help, but still looking for an answer. If there's any other details I can provide I will.

Ixrec

  • Hero Member
  • *****
  • Posts: 1241
    • View Profile
    • Email
Re: Undefined references to everything outside of the core package.
« Reply #2 on: August 24, 2013, 12:40:11 am »
I guess I can list all the usual boilerplate answers for you.

Are you mixing debug/release binaries or settings?
Have you double, triple and quadruple checked that all of your IDE settings match the tutorial exactly?
Are you sure you downloaded the right version of the binaries for your compiler? (ie right compiler, 32-bit vs 64-bit, though iirc that doesn't affect Macs)
Are you sure you're linking to the sfml-main module and the right version of it? (though that should be a Windows-only issue...)
Have you tried compiling SFML yourself instead? Sometimes that's easier than getting pre-compiled versions to work.

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: Undefined references to everything outside of the core package.
« Reply #3 on: August 26, 2013, 08:15:53 pm »
Have you double, triple and quadruple checked that all of your IDE settings match the tutorial exactly?
Are you sure you downloaded the right version of the binaries for your compiler?

Go with that. The tutorial has a few warnings in red. It should be explicit enough for you to fix your issue.
SFML / OS X developer

Colecf

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Undefined references to everything outside of the core package.
« Reply #4 on: August 26, 2013, 11:44:54 pm »
Found my issue. For some reason I was on C++98 instead of C++11. Thanks for your help!