Hello! I'll keep it short, I love Allegro.
I've been having problems with Allegro 5.2.1 anytime I try to use something from the Allegro Audio module, it throws the following errors when trying to compile.
Here's the code I'm using.
Build: Debug in test (
compiler: GNU GCC Compiler) ===|
In function `dsound_open':|
3C:\dev\allegro_winpkg\universal\allegro\addons\audio\dsound.cpp|252|undefined reference to `DirectSoundCreate8@12'|
In function `dsound_open_recorder':|
5C:\dev\allegro_winpkg\universal\allegro\addons\audio\dsound.cpp|731|undefined reference to `DirectSoundCaptureCreate8@12'|
error: ld returned 1 exit
Build failed: 3
I was using Allegro 5.0.10 in a small game thing I'm making which also uses Allegro Tiled, Taglib, and Lua Bridge. It all worked fine in my other PC with Windows XP. Then brought all the things to this other PC, which has Windows 10, and the thing I had just imploded when I tried to run it. So, well, I was going to recompile it to start hammering it here, and nothing worked because I had a different compiler (everything was set to use MinGW 4.7.0). Okay, that's something I expected, so, I took the opportunity to upgrade.
Changed Allegro to 5.2.1 and downloaded MinGW32-w64 with GCC 5.3.0 since I read somewhere it was the right one. I've been having problems everywhere. But this one in particular I really have no idea.
Since it references DirectSound, I've downloaded the small, trimmed version of DirectX9 dependencies from here: http://liballeg.org/download.html specifically the file named dx9mgw.zip, but it just ignores it, either having the corresponding dsound.lib or not the error message persists, maybe it uses a different version?
Added the dsound.lib to the linker, set -ldsound as a linker option, no change, it just doesn't seem to care it is there.
So I was wondering if someone here could help me. Here is my code, and withing it is a bad fix for a problem which is there temporally just for testing (I read somewhere it happens when the compiler used by libraries doesn't match, but thing is, it happens even when I'm using only precompiled Allegro 5.2.1 and its dependencies).
Downloaded from here: http://liballeg.org/download.html#windows_binaries
argc, char **
12 //If I leave this piece of code commented, it works
13 //does nothing as expected but compiles and runs.
17 ALLEGRO_AUDIO_STREAM *stream = al_load_audio_stream("northfair.it", 10, 10);
18 ALLEGRO_MIXER *mixer = al_get_default_mixer();
19 al_attach_audio_stream_to_mixer(stream, mixer);*/
20 return 0;
Thanks in advance.