Mikmod requirement still persists in SDL_mixer 1.2.11?

Hello all,

I have a problem: Mix_OpenAudio() fails with an error message about not
being able to load mikmod.dll, what I thought was (mostly?) fixed in
1.2.11. At first, I suspected an old version of SDL_mixer.dll was
somehow being loaded but Mix_Linked_Version() tells it’s indeed 1.2.11.

What makes this curious is that I have another project that builds and
runs perfectly using the exact same DLL’s, headers, libs, GCC switches
etc. and I don’t think there’s any critically different code. I
certainly don’t have mikmod.dll anywhere on my computer. The weirdness
hints it might be me who’s at fault here, but I’m out of ideas.

I’m using MinGW/GCC4.4.1 on Windows 7 (x64). Included is code that can
be used to reproduce the problem with SDL 1.2.13 and SDL_Mixer 1.2.11.

—Makefile—
t.exe: t.c
gcc -o t.exe t.c -I /mingw/include/sdl -lmingw32 -lSDLmain -lSDL
-lSDL_mixer

—t.c—
#include “SDL.h”
#include “SDL_mixer.h”

int main(int argc, char **argv)
{
SDL_Init(SDL_INIT_AUDIO);
atexit(SDL_Quit);

SDL_version compile_version;
const SDL_version *link_version = Mix_Linked_Version();
SDL_MIXER_VERSION(&compile_version);
fprintf(stderr, "compiled with SDL_mixer version: %d.%d.%d\n",
		compile_version.major,
		compile_version.minor,
		compile_version.patch);
fprintf(stderr, "running with SDL_mixer version: %d.%d.%d\n",
		link_version->major,
		link_version->minor,
		link_version->patch);

Mix_Init(0);

if (!Mix_OpenAudio(44100, AUDIO_S16SYS, 2, 1000))
{
	fprintf(stderr, "Mix_OpenAudio failed: %s", Mix_GetError());
	return 0;
}

Mix_Quit();

return 0;

}–
Tero Lindeman
@Tero_Lindeman

17.3.2010 13:37, Tero Lindeman kirjoitti:

Hello all,

Ok, sorry for replying to myself but it seems I just needed to make
myself look stupid in front of millions of SDL developers. :wink:

Note to self: Mix_OpenAudio() returns ZERO if it succeeded. ZERO.–
Tero Lindeman
@Tero_Lindeman

Yep! A lot of things do in SDL. Welcome to the *nix mentality!>----- Original Message ----

From: Tero Lindeman
Subject: Re: [SDL] mikmod requirement still persists in SDL_mixer 1.2.11?

17.3.2010 13:37, Tero Lindeman kirjoitti:

Hello all,

Ok, sorry for replying to myself but it seems I just needed to make myself look stupid in front of millions of SDL developers. :wink:

Note to self: Mix_OpenAudio() returns ZERO if it succeeded. ZERO.