So I am trying to get a basic sdl program to compile. I have been confronted with multiple different errors which I have resolved from being unable to find the libraries in question. This error however I have no idea how to fix. The bad realoc error in particular concerns me, though I assume it will go away once I figure out how to define the particular functions involved.
So Windows 7, 64bit using gcc.exe from mingw
I grabbed SDL2-devel-2.0.3-mingw.tar.gz from https://www.libsdl.org/download-2.0.php
I have a compile.bat file which I made myself.
D:
"D:\MinGW\bin\gcc.exe" sdlproto.c -o sdlproto.exe -ISDL2-2.0.3\x86_64-w64-mingw32\include\SDL2 -LSDL2-2.0.3\x86_64-w64-mingw32\lib -lSDL2 -lSDL2main
pause
So the Error Message
C:\Users\BREADP~1\AppData\Local\Temp\ccitXsxN.o:sdlproto.c:(.text+0xe): undefined reference to `SDL_Init'
C:\Users\BREADP~1\AppData\Local\Temp\ccitXsxN.o:sdlproto.c:(.text+0x13): undefined reference to `SDL_Quit'
d:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: C:\Users\BREADP~1\AppData\Local\Temp\ccitXsxN.o: bad reloc address 0x20 in section `.eh_frame'
d:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: final link failed: Invalid operationcollect2.exe: error: ld returned 1 exit status