Hello I Am Using SDL2 With MINGW To Make A Simple Window And It Cannot Compile, The Code Is The Following And The Result Is The Following:
 #include <iostream>
 #include "SDL/SDL.h" 
 using namespace std
 int main(int argc, char* args[])
 {
     SDL_Window *win = SDL_CreateWindow("WINDOW TEST", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 800, 600, SDL_WINDOW_SHOWN);
     main_t:
     // this is the loop
     goto main_t;
     return 0;
 }
Build errors:
c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../.. ../libSDL2main.a(SDL_windows_main.o): In function `main_getcmdline': /Users/slouken/release/SDL/SDL2-2.0.5-source/foo-x86/../src/main/windows/SDL_windows_main.c:142: undefined reference to `SDL_wcslen' /Users/slouken/release/SDL/SDL2-2.0.5-source/foo-x86/../src/main/windows/SDL_windows_main.c:142: undefined reference to `SDL_iconv_string' c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../libSDL2main.a(SDL_windows_main.o): In function `ParseCommandLine': /Users/slouken/release/SDL/SDL2-2.0.5-source/foo-x86/../src/main/windows/SDL_windows_main.c:54: undefined reference to `SDL_isspace' c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../libSDL2main.a(SDL_windows_main.o): In function `main_getcmdline': /Users/slouken/release/SDL/SDL2-2.0.5-source/foo-x86/../src/main/windows/SDL_windows_main.c:153: undefined reference to `SDL_malloc' c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../libSDL2main.a(SDL_windows_main.o): In function `ParseCommandLine': /Users/slouken/release/SDL/SDL2-2.0.5-source/foo-x86/../src/main/windows/SDL_windows_main.c:54: undefined reference to `SDL_isspace' /Users/slouken/release/SDL/SDL2-2.0.5-source/foo-x86/../src/main/windows/SDL_windows_main.c:80: undefined reference to `SDL_isspace' c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../libSDL2main.a(SDL_windows_main.o): In function `main_utf8': /Users/slouken/release/SDL/SDL2-2.0.5-source/foo-x86/../src/main/windows/SDL_windows_main.c:123: undefined reference to `SDL_SetMainReady' c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../libSDL2main.a(SDL_windows_main.o): In function `main_getcmdline': /Users/slouken/release/SDL/SDL2-2.0.5-source/foo-x86/../src/main/windows/SDL_windows_main.c:161: undefined reference to `SDL_free' /Users/slouken/release/SDL/SDL2-2.0.5-source/foo-x86/../src/main/windows/SDL_windows_main.c:162: undefined reference to `SDL_free' c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../libSDL2main.a(SDL_windows_main.o): In function `ParseCommandLine': /Users/slouken/release/SDL/SDL2-2.0.5-source/foo-x86/../src/main/windows/SDL_windows_main.c:80: undefined reference to `SDL_isspace' c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../libSDL2main.a(SDL_windows_main.o): In function `OutOfMemory': /Users/slouken/release/SDL/SDL2-2.0.5-source/foo-x86/../src/main/windows/SDL_windows_main.c:107: undefined reference to `SDL_ShowSimpleMessageBox' c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../libSDL2main.a(SDL_windows_main.o): In function `console_wmain': /Users/slouken/release/SDL/SDL2-2.0.5-source/foo-x86/../src/main/windows/SDL_windows_main.c:181: undefined reference to `SDL_malloc' /Users/slouken/release/SDL/SDL2-2.0.5-source/foo-x86/../src/main/windows/SDL_windows_main.c:185: undefined reference to `SDL_wcslen' /Users/slouken/release/SDL/SDL2-2.0.5-source/foo-x86/../src/main/windows/SDL_windows_main.c:185: undefined reference to `SDL_iconv_string' c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../libSDL2main.a(SDL_windows_main.o): In function `main_utf8': /Users/slouken/release/SDL/SDL2-2.0.5-source/foo-x86/../src/main/windows/SDL_windows_main.c:123: undefined reference to `SDL_SetMainReady' c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../libSDL2main.a(SDL_windows_main.o): In function `console_wmain': /Users/slouken/release/SDL/SDL2-2.0.5-source/foo-x86/../src/main/windows/SDL_windows_main.c:192: undefined reference to `SDL_free' collect2.exe: error: ld returned 1 exit status
 
    