SFML community forums
Help => Audio => Topic started by: iHope 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...
-
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.
-
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.
-
There's a tutorial on the SFML homepage...
-
Could you please put a link to there. I know, I'm pathetic 'cause I can't find the tutorial.
-
Tutorials -> Tutorials for version 1.6 -> Getting started -> SFML and Xcode (Mac OS X) :)
-
Thx a lot man! :D
Never expected to get a answer to my question today. Dude, you saved my day.