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

Author Topic: SFML 1.6 Audio problem  (Read 3931 times)

0 Members and 1 Guest are viewing this topic.

iHope

  • Newbie
  • *
  • Posts: 35
    • View Profile
SFML 1.6 Audio problem
« on: January 02, 2012, 09:55:02 am »
So, could anyone help with this problem? Im trying to play music in my app, but I always get something like this. I tried that code in "Playing music" tutorial, but again something like this. I have no idea why it doesn't work. Oh, right I'm using Xcode 3.2

Undefined symbols:
  "sf::Music::Music(unsigned long)", referenced from:
      _main in main.o
  "sf::SoundStream::Stop()", referenced from:
      _main in main.o
  "sf::SoundStream::Play()", referenced from:
      _main in main.o
      _main in main.o
  "sf::Music::~Music()", referenced from:
      _main in main.o
      _main in main.o
  "sf::Music::OpenFromFile(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)", referenced from:
      _main in main.o
  "sf::SoundStream::GetStatus() const", referenced from:
      _main in main.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

Sorry about my bad english...

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
SFML 1.6 Audio problem
« Reply #1 on: January 02, 2012, 11:04:56 am »
Did you link sfml-audio(-s)(-d)? You need the -s for static linkage and the -d for the debug configuration, and both if you combine them.

And for static linkage in SFML 2, you have to define SFML_STATIC. In SFML 1, the macro SFML_DYNAMIC is required for dynamic linkage.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

iHope

  • Newbie
  • *
  • Posts: 35
    • View Profile
SFML 1.6 Audio problem
« Reply #2 on: January 02, 2012, 12:01:03 pm »
Sorry, but I don't know how to link in Xcode 3.2  :D
If you(anyone) could give any kind of instructions for that I would be really grateful.

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
SFML 1.6 Audio problem
« Reply #3 on: January 02, 2012, 01:07:10 pm »
There's a tutorial on the SFML homepage...
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

iHope

  • Newbie
  • *
  • Posts: 35
    • View Profile
SFML 1.6 Audio problem
« Reply #4 on: January 02, 2012, 01:26:17 pm »
Could you please put a link to there. I know, I'm pathetic 'cause I can't find the tutorial.

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
SFML 1.6 Audio problem
« Reply #5 on: January 02, 2012, 01:40:19 pm »
Tutorials -> Tutorials for version 1.6 -> Getting started -> SFML and Xcode (Mac OS X) :)
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

iHope

  • Newbie
  • *
  • Posts: 35
    • View Profile
SFML 1.6 Audio problem
« Reply #6 on: January 02, 2012, 01:56:21 pm »
Thx a lot man!  :D
Never expected to get a answer to my question today. Dude, you saved my day.