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

Author Topic: Link Errors with sfml-audio-s.lib in version 3.0.0  (Read 95 times)

0 Members and 1 Guest are viewing this topic.

SPJ-Game-Dev

  • Newbie
  • *
  • Posts: 1
    • View Profile
Link Errors with sfml-audio-s.lib in version 3.0.0
« on: December 28, 2024, 03:25:02 am »
I was getting link errors with the statically linked sfml-audio-s.lib in Visual Studio 2022. I replaced it with sfml-audio.lib and added the dll file to the project folder and I am able to use the Audio library now. I'm not sure if this is a known issue, but using the dynamically linked file seems to be a good workaround for now.

kojack

  • Sr. Member
  • ****
  • Posts: 352
  • C++/C# game dev teacher.
    • View Profile
Re: Link Errors with sfml-audio-s.lib in version 3.0.0
« Reply #1 on: December 28, 2024, 07:50:34 am »
The static versions of SFML don't include their dependencies, you need to link them manually.
https://www.sfml-dev.org/faq/build-use/#link-static
This means you have to also link libraries like flac, openal, vorbis, etc.

Also make sure you add SFML_STATIC to your preprocessor settings for the project, otherwise static libraries can't be linked correctly.
« Last Edit: December 28, 2024, 07:52:25 am by kojack »

 

anything