I don't know why my code doesn't link.
Gcc Command:
g++.exe -g -std=c++17 main.cpp -ISDL2\include -o main.exe -LSDL2\lib -lmingw32 -lSDL2main -lSDL2
main.cpp:
#define SDL_MAIN_HANDLED
#include <SDL/SDL.h>
int main() {
SDL_Delay(5000);
return 0;
}
Error:
In function `main':
main.cpp:10: undefined reference to `SDL_Delay'
collect2.exe: error: ld returned 1 exit status
I tried many different orders of the parameters.
I also tried to reinstall / use other mingw / sdl2 releases.