0

I tried to make a sound in sdl 2, but when i compiled this line:

Mix_OpenAudio( 44100, MIX_DEFAULT_FORMAT, 2, 2048 );

my exe told me that SDL_AudioStreamFlush could not be located in the dynamic link library SDL2_mixer.dll (there was also path to the dll).

Before asking I reinstalled everything and there was the same error.

I used SDL2_mixer-devel-2.0.2-mingw SDL2_image-devel-2.0.1-mingw and SDL2-devel-2.0.6-mingw.

Compiled with this flags:-lmingw32 -lSDL2main -lSDL2 -lSDL2_image -lSDL2_mixer

Please someone who know SDL help!

P.S. sorry for bad english

Maxim Zhuchkov
  • 141
  • 1
  • 10
  • Is this a _compiletime_ or a _runtime_ error? – Ctx Nov 05 '17 at 15:50
  • runtime error ... – Maxim Zhuchkov Nov 05 '17 at 15:52
  • Then it looks like the compiler uses another variant of the library than the dynamic linker at runtime... – Ctx Nov 05 '17 at 15:53
  • What can i do with this? – Maxim Zhuchkov Nov 05 '17 at 16:06
  • SDL 2.0.6 or later should have said symbol. Have you updated dll too in addition to `.dll.a`? Where is it placed? You can use dependency walker to check which dll will be loaded. – keltar Nov 05 '17 at 17:25
  • I just extracted all the stuff in SDL2_mixer-devel-2.0.2-mingw SDL2_image-devel-2.0.1-mingw and SDL2-devel-2.0.6-mingw archives into one floder and put -IC and -LC. I do not know where I store `.dll.a` files – Maxim Zhuchkov Nov 05 '17 at 18:29
  • @MaximZhuchkov fine, but what about `SDL2.dll` itself? It should be reachable during execution, so in your executable's directory, or one of system directories (e.g. system32). If you haven't done that and one of system paths contains `SDL2.dll`, it will be loaded, which is very likely to be earlier than 2.0.6. That is exactly the reason I recommended dependency walker or something equivalent. – keltar Nov 06 '17 at 06:34
  • @keltar all dlls in the same directory with exe file. I moved all dll files into system32 and it seems to be good... – Maxim Zhuchkov Nov 07 '17 at 10:01
  • @keltar aaand the same error... – Maxim Zhuchkov Nov 07 '17 at 10:03
  • @MaximZhuchkov can reproduce on 64bit windows with mingw. Kind of surprised. It is fine with SDL 2.0.7 though. – keltar Nov 08 '17 at 07:37

0 Answers0