Trouble using self-compiled sdl_mixer and OGG files

Hi there,

I want to use a self-compiled version of sdl_mixer. However, somehow all
my compiled version fail to correctly use the OGG libraries which are
dynamically linked.
I use Windows and Microsoft Visual C++ 2005 Express Edition. I have
successfully compiled SDL and SDL_mixer in this environment - the
sdl.dll it built seems to work well, just the sdl_mixer.dll doesn’t work
correctly.

I tried opening a simple OGG file using the following code (Pascal code
but you should be able to read it as I only used basic functions, it is
a test program):

SDL_Init(SDL_INIT_AUDIO); //returns 0, works!
Mix_OpenAudio(32000,MIX_DEFAULT_FORMAT,MIX_DEFAULT_CHANNELS,512);
//returns 0, works!
Mix_QuerySpec(u,j,a); //returns 1, works!
Mix:=Mix_LoadMUS(‘e:\server\www\sa2b-ogl\a_mine.ogg’); //returns nil!
Mix_PlayMusic(Mix,-1); //cannot work on nil

Well, I debugged my dll file. It initialized the ogg vorbis DLLs
successfully.It finally crashed at the call
if ( vorbis.ov_open(fp, &music->vf, NULL, 0) < 0 ) {
on line 79 of music_ogg.c . Why that… if I remove the DLLs from the
debugging directory it doesn’t even reach the line (correctly, it aborts
even before it).
The error is:

Access violation at address 7C918FEA in module ‘ntdll.dll’. Write of
address 00000010.

This happens with both debug releases of SDL and SDL_mixer as well as
with non-debug releases.
The only fix so far was deactivating OGG_DYNAMIC and using the .lib
files from old SDL_mixer versions.

What can I do so that sdl_mixer successfully links to the DLLs.

Thank you,

Julian