0

I planned on adding sound effects to a smal project. i downloaded the SDL_Mixer dev-library for mingw32, moved all the files from its lib folder to the mingw32 lib folder, did the same for include and bin. But iam still not able to compile anything using #include SDL2/SDL_mixer.h.

´C:/Development/SDL Mixer/include/SDL2/SDL_mixer.h:25:10: fatal error: SDL_stdinc.h: No such file or directory´

Maybe it is my makefile.

´build:
    gcc -Wfatal-errors \
    -std=c99 \
    ./*.c \
    -I"C:\Development\SDL2 MinGW 64\include" \
    -L"C:\Development\SDL2 MinGW 64\lib" \
    -I"C:\Development\SDL Mixer\include" \
    -L"C:\Development\SDL Mixer\lib" \
    -lmingw32 \
    -lSDL2main \
    -lSDL2 \
    -o example.exe´

i dont know why files are missing.

  • From where did you download SDL_mixer? Are you sure it's SDL**2**_mixer and not the one for SDL 1.2? – HolyBlackCat Jan 26 '20 at 20:45
  • @HolyBlackCat i used this [link](https://www.libsdl.org/projects/SDL_mixer/) and the dev library – Umbranoctuna Jan 26 '20 at 20:47
  • Do you have `SDL_stdinc.h` in `C:\Development\SDL2 MinGW 64\include`? – HolyBlackCat Jan 26 '20 at 20:53
  • @HolyBlackCat ok i did that, that one error doesnt pop up anymore, now it has a lot of undefined appdata temp folder – Umbranoctuna Jan 26 '20 at 21:19
  • Please post the exact errors. – HolyBlackCat Jan 26 '20 at 21:29
  • @HolyBlackCat i cant realy sleep without fixing this errors: C:\Users\paulr\AppData\Local\Temp\ccTHou4i.o:main.c:(.text+0x25e): Warnung: undefinierter Verweis auf ╗Mix_OpenAudio½ C:\Users\paulr\AppData\Local\Temp\ccTHou4i.o:main.c:(.text+0x26a): Warnung: undefinierter Verweis auf ╗Mix_LoadMUS½ C:\Users\paulr\AppData\Local\Temp\ccTHou4i.o:main.c:(.text+0xc23): Warnung: undefinierter Verweis auf ╗Mix_PlayMusic½ C:\Users\paulr\AppData\Local\Temp\ccTHou4i.o:main.c:(.text+0xc6f): Warnung: undefinierter Verweis auf ╗Mix_FreeMusic½ basicly reads "undefined reference to" – Umbranoctuna Jan 26 '20 at 21:50
  • Add `-lSDL2_mixer` (or something like that) at the end of the command. – HolyBlackCat Jan 26 '20 at 21:52
  • @HolyBlackCat in the command line, or in my makefile? – Umbranoctuna Jan 26 '20 at 21:56
  • In the makefile, right after `-lSDL2`. – HolyBlackCat Jan 26 '20 at 21:59
  • @HolyBlackCat Thank you so much, it worked, i was able to play the file i wanted in my programm. – Umbranoctuna Jan 26 '20 at 22:08

0 Answers0