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

Author Topic: Compiler errors on music & sound  (Read 3103 times)

0 Members and 1 Guest are viewing this topic.

nimn

  • Newbie
  • *
  • Posts: 13
    • View Profile
Compiler errors on music & sound
« 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)

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Re: Compiler errors on music & sound
« Reply #1 on: July 01, 2017, 10:17:52 am »
Are you linking sfml-audio?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

nimn

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Compiler errors on music & sound
« Reply #2 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