SFML community forums
Help => Audio => Topic started by: LedLoaf on July 20, 2018, 11:53:42 pm
-
Hello,
I'm using SFML 2.5 static in debug (-s-d.lib) and I'm having trouble with the audio from a book. I was thinking that something might have changed with the audio since the previous version (never had this problem), but I didn't see anything. I also can't find really anything with this error.
1>flac.lib(stream_decoder.obj) : error LNK2019: unresolved external symbol ___iob_func referenced in function _FLAC__stream_decoder_reset
1>flac.lib(stream_encoder.obj) : error LNK2001: unresolved external symbol ___iob_func
1>flac.lib(win_utf8_io.obj) : error LNK2001: unresolved external symbol ___iob_func
1>D:\Projects\MyProjects\PGC_Rogue\bin\$(ProjectName\PGC_Rogue.exe : fatal error LNK1120: 1 unresolved externals
It says flac.lib and I made sure that it was not from another version. It says it's a linker problem, I have all the correct lib includes. I've never had this issue before. This is from a skeleton template from a book (Procedural Generation Content with C++). So my only guess is that they are using something outdated?
I've attached the .cpp file that causes the problem. I disabled it while I went through the book, but I'm at the point where I'm adding sound. I do not have this problem with other SFML books involving audio.
I'd like to stick with the template provided by the book, but if I must I'll use something I have from another book.
Thanks, guys!
EDIT: I'm not using the class in the project anywhere, I'm just trying to launch the code first.
EDIT2: I tried to just make the audio not static. It looks like it read it fine. I took off the static and it did compile fine. So this has something to do with the static.
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
sfml-main-d.lib
winmm.lib
gdi32.lib
freetype.lib
opengl32.lib
openal32.lib
ogg.lib
flac.lib
vorbis.lib
vorbisfile.lib
vorbisenc.lib
ws2_32.lib
-
Where did you get flac.lib from?
-
Sorry eXpl0it3r, I totally forgot I had posted a question. I forgot to bookmark it.
flac.lib came from the SFML winrar file (SFML-2.5.0-windows-vc15-32-bit). Is it not required to run sfml-audio-s correctly? I have since been running the non-static version since I couldn't get this to work with the static version.
I was under the impression I needed to run the dependencies for sfml-audio-s.lib which said sfml-system-s, openal32, flac, vorbisenc, vorbisfile, vorbis, ogg
I have an additional question:
This is with the non-static version. I've been getting this message. It doesn't seem to affect anything, but it does show up. I am running a GT73VR 7RF Titan Pro laptop. Does this have something to do with the lack of speakers?
In the console, since 2.5, I get a message that says
"AL lib: (EE) SetChannelMap: Failed to match front-center channel(2) in channel map.
As I stated, the sound is working fine. I just never came across this until the update.