16
Audio / Audio errors with a book template.
« 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.
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.
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.
Quote
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.
Quote
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