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

Author Topic: Audio module linking error  (Read 3560 times)

0 Members and 1 Guest are viewing this topic.

Mangonels

  • Newbie
  • *
  • Posts: 1
    • View Profile
    • Email
Audio module linking error
« on: January 31, 2020, 07:14:07 pm »
Hi, I'm trying to statically link the graphics, window, system, audio and network sfml modules to my Visual Studio project.

So far, using the provided "short example" sfml code, everything works, except for audio. As soon as I initialize a music object and compile, what seem to be some linking errors appear:

I managed to get everything except audio working by:

1. Downloading the sfml source and making a VS 2019 project from it on a diferent folder, with CMake, then compiling it in VS.

2. Linking my project to the libraries, full configuration details:

In C/C++ > General > Additional include directories, added this directory:
C:\libraries\SFML\SFML-2.5.1\include

In C/C++ > Preprocessor >  Preprocessor Definitions, prepended the flag: SFML_STATIC;

In Linker > General > Additional Library Directories, added these 2 directories:
C:\libraries\SFML\SFML-2.5.1\extlibs\libs-msvc\x64;
C:\libraries\SFML\SFMLx64SourceAndCompile\lib\Debug

In Linker > Input > AdditionalDependencies, added the following library modules:
opengl32.lib;openal32.lib;freetype.lib;winmm.lib;gdi32.lib;flac.lib;vorbisenc.lib;vorbisfile.lib;vorbis.lib;ogg.lib;ws2_32.lib;sfml-graphics-s-d.lib;sfml-window-s-d.lib;sfml-system-s-d.lib;sfml-audio-s-d.lib;sfml-network-s-d.lib;

This previous linking procedure is for debug mode's case, in release mode I have the same issue.

Question 1: Additionally I also added openal32.dll to the executable directories, although I think this is irrelevant for my issue. I'm also clueless as to why this is necesary, I thought dll's where linked to dinamically? If anyone would like to explain (or link to explanation) I'd appreciate it.

Question 2 (main): Any ideas on how to fix the linking errors? Thanks in advance :)
« Last Edit: January 31, 2020, 07:27:55 pm by Mangonels »

 

anything