SFML community forums

Help => Audio => Topic started by: stewart on April 13, 2010, 11:51:01 am

Title: Cant find soundbuffer
Post by: stewart on April 13, 2010, 11:51:01 am
Hey guys I am getting

Quote


Line Location Tool:0: collect2: ld returned 1 exit status
Line Location Tool:0: "sf::SoundBuffer::SoundBuffer()", referenced from:
Line Location Tool:0: symbol(s) not found
Line Location Tool:0: _main in main.o
Line Location Tool:0: _main in main.o
Line Location Tool:0: "sf::SoundBuffer::~SoundBuffer()", referenced from:
Line Location Tool:0: _main in main.o




why i try and run

Code: [Select]

#include <SFML/Audio.hpp>
int main()
{  
    sf::SoundBuffer test;
}


 Running macosx 10.5 with xcode...

All of the SFML/graphics.hpp classes seem to work fine as I have them building and working. However when I try and do anything with audio i get the above.
Title: Cant find soundbuffer
Post by: OniLinkPlus on April 13, 2010, 03:34:38 pm
Are you linking with sfml-audio?
Title: Cant find soundbuffer
Post by: stewart on April 13, 2010, 06:03:49 pm
Quote from: "OniLink10"
Are you linking with sfml-audio?


not totally sure. I am quite new to c++. I used installed the xcode project and I have just been developing in that.
Title: Cant find soundbuffer
Post by: stewart on April 13, 2010, 06:10:27 pm
Quote from: "stewart"
Quote from: "OniLink10"
Are you linking with sfml-audio?


not totally sure. I am quite new to c++. I used installed the xcode project and I have just been developing in that.


Nevermind. Worked it out. So for anyone who had this trouble its very easy to fix. You just need to add the audio framework to your project.

1. Head to frameworks in the groups and files section
2. right click
3. click add existing framework
4. the audo frame work can be found in /library/sfml.audo.framework under MacHD
5. Code :)