SFML community forums

Help => Audio => Topic started by: nimn on July 01, 2017, 07:17:03 am

Title: Compiler errors on music & sound
Post by: nimn on July 01, 2017, 07:17:03 am
Hello - I am getting compiler errors when including any sound or music class
Seem to be Linker errors? not sure - but it all goes sideways once I use either "sf::Music music" or sf::Sound sound". I have #include <SFML/Audio.hpp> and am not sure how to address these... thanks!

For context, I have sprites, vertex arrays, and a few other bits working great- only audio refuses to compile

Errors:
1>Main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::Music::Music(void)" (__imp_??0Music@sf@@QAE@XZ) referenced in function "public: void __thiscall Loop::gameloop(struct ENV &,struct INP &,struct LN &,struct UI &)" (?gameloop@Loop@@QAEXAAUENV@@AAUINP@@AAULN@@AAUUI@@@Z)

1>Main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall sf::Music::~Music(void)" (__imp_??1Music@sf@@UAE@XZ) referenced in function "public: void __thiscall Loop::gameloop(struct ENV &,struct INP &,struct LN &,struct UI &)" (?gameloop@Loop@@QAEXAAUENV@@AAUINP@@AAULN@@AAUUI@@@Z)
Title: Re: Compiler errors on music & sound
Post by: eXpl0it3r on July 01, 2017, 10:17:52 am
Are you linking sfml-audio?
Title: Re: Compiler errors on music & sound
Post by: nimn on July 02, 2017, 02:37:24 am
Thanks dude
I went back over the sfml setup tut and found that I had 3/5 of the modules or whatever linked
Its working great now thanks again