SDL2 2.0.4 various undefined reference to errors with mingw
<p>I would like to use the latest version of SDL2 for a little OpenGL project, so i downloaded the mingw developement library of SDL2 and tried to set it up using Eclipse CDT and MinGW. But for some odd reason, i get lots of "undefined reference to" errors, although i set it up as usual. Here is the output of the build console:</p>

<pre><code>g++ -std=c++0x "-IH:\\C++\\Additional\\AdditionalIncludes" "-IH:\\C++\\Additional\\AdditionalLibraries\\GLM\\glm-0.9.6.3\\glm" "-IH:\\C++\\Additional\\AdditionalLibraries\\GLEW\\glew-1.13.0\\include\\GL" "-IH:\\C++\\Additional\\AdditionalLibraries\\SDL2\\SDL2-2.0.4-OwnBuild\\include" -O2 -g3 -Wall -c -fmessage-length=0 -o main.o "..\\main.cpp" 
g++ "-LH:\\C++\\Additional\\AdditionalLibraries\\GLEW\\glew-1.13.0\\lib\\Release\\Win32" "-LH:\\C++\\Additional\\AdditionalLibraries\\SDL2\\SDL2-2.0.4-OwnBuild\\lib" -static -o "OpenGL Template.exe" main.o -lmingw32 -lSDL2 -lopengl32 -lglu32 -lglew32 -lglew32s 
h:/c++/eclipseportable/mingw/mingw32/bin/../lib/gcc/i686-w64-mingw32/5.2.0/../../../../i686-w64-mingw32/lib/../lib\libmingw32.a(lib32_libmingw32_a-crt0_c.o):crt0_c.c:(.text.startup+0x39): undefined reference to `WinMain@16'
H:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild\lib\libSDL2.a(SDL_windows.o): In function `WIN_CoInitialize':
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/core/windows/SDL_windows.c:73: undefined reference to `CoInitializeEx@8'
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/core/windows/SDL_windows.c:75: undefined reference to `CoInitializeEx@8'
H:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild\lib\libSDL2.a(SDL_windows.o): In function `WIN_CoUninitialize':
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/core/windows/SDL_windows.c:92: undefined reference to `CoUninitialize@0'
H:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild\lib\libSDL2.a(SDL_windowskeyboard.o): In function `IME_SetupAPI':
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:617: undefined reference to `ImmGetIMEFileNameA@12'
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:630: undefined reference to `ImmGetContext@4'
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:633: undefined reference to `ImmReleaseContext@8'
H:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild\lib\libSDL2.a(SDL_windowskeyboard.o): In function `IME_GetId':
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:551: undefined reference to `ImmGetIMEFileNameA@12'
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:566: undefined reference to `GetFileVersionInfoSizeA@8'
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:570: undefined reference to `GetFileVersionInfoA@16'
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:571: undefined reference to `VerQueryValueA@16'
H:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild\lib\libSDL2.a(SDL_windowskeyboard.o): In function `UIElementSink_QueryInterface@12':
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:1013: undefined reference to `IID_IUnknown'
H:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild\lib\libSDL2.a(SDL_windowskeyboard.o): In function `IPPASink_QueryInterface@12':
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:1119: undefined reference to `IID_IUnknown'
H:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild\lib\libSDL2.a(SDL_windowskeyboard.o): In function `UILess_GetCandidateList':
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:984: undefined reference to `SysFreeString@4'
H:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild\lib\libSDL2.a(SDL_windowskeyboard.o): In function `IME_ClearComposition':
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:683: undefined reference to `ImmGetContext@4'
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:687: undefined reference to `ImmNotifyIME@16'
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:691: undefined reference to `ImmNotifyIME@16'
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:692: undefined reference to `ImmReleaseContext@8'
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:689: undefined reference to `ImmSetCompositionStringW@24'
H:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild\lib\libSDL2.a(SDL_windowskeyboard.o): In function `IME_Disable':
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:364: undefined reference to `ImmAssociateContext@8'
H:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild\lib\libSDL2.a(SDL_windowskeyboard.o): In function `UIElementSink_BeginUIElement@12':
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:1051: undefined reference to `SysFreeString@4'
H:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild\lib\libSDL2.a(SDL_windowskeyboard.o): In function `UIElementSink_UpdateUIElement@8':
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:1078: undefined reference to `SysFreeString@4'
H:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild\lib\libSDL2.a(SDL_windowskeyboard.o): In function `IME_Init':
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:309: undefined reference to `CoCreateInstance@20'
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:323: undefined reference to `ImmGetContext@4'
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:324: undefined reference to `ImmReleaseContext@8'
H:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild\lib\libSDL2.a(SDL_windowskeyboard.o): In function `UILess_SetupSinks':
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:1192: undefined reference to `CoCreateInstance@20'
H:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild\lib\libSDL2.a(SDL_windowskeyboard.o): In function `IME_ClearComposition':
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:683: undefined reference to `ImmGetContext@4'
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:687: undefined reference to `ImmNotifyIME@16'
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:691: undefined reference to `ImmNotifyIME@16'
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:692: undefined reference to `ImmReleaseContext@8'
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:689: undefined reference to `ImmSetCompositionStringW@24'
H:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild\lib\libSDL2.a(SDL_windowskeyboard.o): In function `IME_GetId':
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:551: undefined reference to `ImmGetIMEFileNameA@12'
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:566: undefined reference to `GetFileVersionInfoSizeA@8'
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:570: undefined reference to `GetFileVersionInfoA@16'
H:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild\lib\libSDL2.a(SDL_windowskeyboard.o): In function `IME_GetReadingString':
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:423: undefined reference to `ImmGetContext@4'
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:498: undefined reference to `ImmReleaseContext@8'
H:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild\lib\libSDL2.a(SDL_windowskeyboard.o): In function `IME_GetId':
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:571: undefined reference to `VerQueryValueA@16'
H:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild\lib\libSDL2.a(SDL_windowskeyboard.o): In function `IME_Quit':
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:378: undefined reference to `ImmAssociateContext@8'
H:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild\lib\libSDL2.a(SDL_windowskeyboard.o): In function `IME_Enable':
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:349: undefined reference to `ImmAssociateContext@8'
H:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild\lib\libSDL2.a(SDL_windowskeyboard.o): In function `IME_ClearComposition':
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:683: undefined reference to `ImmGetContext@4'
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:687: undefined reference to `ImmNotifyIME@16'
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:691: undefined reference to `ImmNotifyIME@16'
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:692: undefined reference to `ImmReleaseContext@8'
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:689: undefined reference to `ImmSetCompositionStringW@24'
H:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild\lib\libSDL2.a(SDL_windowskeyboard.o): In function `IME_Disable':
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:364: undefined reference to `ImmAssociateContext@8'
H:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild\lib\libSDL2.a(SDL_windowskeyboard.o): In function `WIN_SetTextInputRect':
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:202: undefined reference to `ImmGetContext@4'
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:209: undefined reference to `ImmSetCompositionWindow@8'
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:210: undefined reference to `ImmReleaseContext@8'
H:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild\lib\libSDL2.a(SDL_windowskeyboard.o): In function `IME_HandleMessage':
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:852: undefined reference to `ImmGetContext@4'
H:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild\lib\libSDL2.a(SDL_windowskeyboard.o): In function `IME_GetCompositionString':
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:699: undefined reference to `ImmGetCompositionStringW@16'
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:704: undefined reference to `ImmGetCompositionStringW@16'
H:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild\lib\libSDL2.a(SDL_windowskeyboard.o): In function `IME_HandleMessage':
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:890: undefined reference to `ImmReleaseContext@8'
H:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild\lib\libSDL2.a(SDL_windowskeyboard.o): In function `IME_ClearComposition':
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:683: undefined reference to `ImmGetContext@4'
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:687: undefined reference to `ImmNotifyIME@16'
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:691: undefined reference to `ImmNotifyIME@16'
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:692: undefined reference to `ImmReleaseContext@8'
H:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild\lib\libSDL2.a(SDL_windowskeyboard.o): In function `IME_HandleMessage':
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:885: undefined reference to `ImmGetContext@4'
H:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild\lib\libSDL2.a(SDL_windowskeyboard.o): In function `IME_GetCandidateList':
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:767: undefined reference to `ImmGetCandidateListW@16'
H:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild\lib\libSDL2.a(SDL_windowskeyboard.o): In function `IME_GetCompositionString':
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:699: undefined reference to `ImmGetCompositionStringW@16'
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:704: undefined reference to `ImmGetCompositionStringW@16'
H:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild\lib\libSDL2.a(SDL_windowskeyboard.o): In function `IME_ClearComposition':
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:689: undefined reference to `ImmSetCompositionStringW@24'
H:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild\lib\libSDL2.a(SDL_windowskeyboard.o): In function `IME_GetCandidateList':
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:771: undefined reference to `ImmGetCandidateListW@16'
H:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild\lib\libSDL2.a(SDL_windowskeyboard.o): In function `IME_Render':
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:1520: undefined reference to `CreateCompatibleDC@4'
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:1525: undefined reference to `DeleteDC@4'
H:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild\lib\libSDL2.a(SDL_windowskeyboard.o): In function `IME_RenderCandidateList':
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:1394: undefined reference to `CreatePen@12'
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:1395: undefined reference to `CreateSolidBrush@4'
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:1396: undefined reference to `CreatePen@12'
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:1397: undefined reference to `CreateSolidBrush@4'
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:1398: undefined reference to `CreatePen@12'
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:1399: undefined reference to `CreateSolidBrush@4'
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:1400: undefined reference to `CreateFontW@56'
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:1402: undefined reference to `SetBkMode@8'
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:1403: undefined reference to `SelectObject@8'
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:1410: undefined reference to `GetTextExtentPoint32W@16'
H:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild\lib\libSDL2.a(SDL_windowskeyboard.o): In function `StartDrawToBitmap':
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:1259: undefined reference to `CreateDIBSection@24'
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:1261: undefined reference to `SelectObject@8'
H:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild\lib\libSDL2.a(SDL_windowskeyboard.o): In function `IME_RenderCandidateList':
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:1458: undefined reference to `SelectObject@8'
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:1459: undefined reference to `SelectObject@8'
H:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild\lib\libSDL2.a(SDL_windowskeyboard.o): In function `DrawRect':
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:1285: undefined reference to `Rectangle@20'
H:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild\lib\libSDL2.a(SDL_windowskeyboard.o): In function `IME_RenderCandidateList':
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:1462: undefined reference to `SelectObject@8'
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:1463: undefined reference to `SelectObject@8'
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:1464: undefined reference to `SetTextColor@8'
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:1465: undefined reference to `SetBkMode@8'
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:1496: undefined reference to `SelectObject@8'
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:1497: undefined reference to `SelectObject@8'
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:1498: undefined reference to `SetTextColor@8'
H:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild\lib\libSDL2.a(SDL_windowskeyboard.o): In function `DrawRect':
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:1285: undefined reference to `Rectangle@20'
H:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild\lib\libSDL2.a(SDL_windowskeyboard.o): In function `IME_RenderCandidateList':
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:1502: undefined reference to `ExtTextOutW@32'
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:1491: undefined reference to `SelectObject@8'
H:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild\lib\libSDL2.a(SDL_windowskeyboard.o): In function `StopDrawToBitmap':
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:1270: undefined reference to `DeleteObject@4'
H:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild\lib\libSDL2.a(SDL_windowskeyboard.o): In function `IME_RenderCandidateList':
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:1506: undefined reference to `DeleteObject@4'
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:1507: undefined reference to `DeleteObject@4'
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:1508: undefined reference to `DeleteObject@4'
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:1509: undefined reference to `DeleteObject@4'
H:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild\lib\libSDL2.a(SDL_windowskeyboard.o):h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowskeyboard.c:1510: more undefined references to `DeleteObject@4' follow
H:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild\lib\libSDL2.a(SDL_windowsmessagebox.o): In function `WIN_ShowMessageBox':
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowsmessagebox.c:396: undefined reference to `CreateCompatibleDC@4'
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowsmessagebox.c:405: undefined reference to `CreateFontIndirectW@4'
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowsmessagebox.c:409: undefined reference to `SelectObject@8'
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowsmessagebox.c:413: undefined reference to `GetTextMetricsW@8'
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowsmessagebox.c:428: undefined reference to `DeleteDC@4'
H:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild\lib\libSDL2.a(SDL_windowsmessagebox.o): In function `CreateDialogData':
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowsmessagebox.c:301: undefined reference to `GetDeviceCaps@8'
H:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild\lib\libSDL2.a(SDL_windowsmouse.o): In function `WIN_CreateCursor':
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowsmouse.c:129: undefined reference to `CreateDIBSection@24'
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowsmouse.c:130: undefined reference to `CreateBitmap@20'
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowsmouse.c:140: undefined reference to `DeleteObject@4'
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowsmouse.c:141: undefined reference to `DeleteObject@4'
H:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild\lib\libSDL2.a(SDL_windowsshape.o): In function `CombineRectRegions':
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowsshape.c:53: undefined reference to `CreateRectRgn@16'
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowsshape.c:55: undefined reference to `CombineRgn@16'
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowsshape.c:56: undefined reference to `DeleteObject@4'
H:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild\lib\libSDL2.a(SDL_windowswindow.o): In function `WIN_SetWindowGammaRamp':
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowswindow.c:606: undefined reference to `CreateDCW@16'
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowswindow.c:608: undefined reference to `SetDeviceGammaRamp@8'
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowswindow.c:612: undefined reference to `DeleteDC@4'
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowswindow.c:612: undefined reference to `DeleteDC@4'
H:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild\lib\libSDL2.a(SDL_windowswindow.o): In function `WIN_GetWindowGammaRamp':
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowswindow.c:625: undefined reference to `CreateDCW@16'
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowswindow.c:627: undefined reference to `GetDeviceGammaRamp@8'
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowswindow.c:631: undefined reference to `DeleteDC@4'
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/video/windows/SDL_windowswindow.c:631: undefined reference to `DeleteDC@4'
H:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild\lib\libSDL2.a(SDL_mmjoystick.o): In function `SDL_SYS_JoystickInit':
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/joystick/windows/SDL_mmjoystick.c:166: undefined reference to `joyGetNumDevs@0'
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/joystick/windows/SDL_mmjoystick.c:171: undefined reference to `joyGetPosEx@8'
h:\C++\Additional\AdditionalLibraries\SDL2\SDL2-2.0.4-OwnBuild/src/joystick/windows/SDL_mmjoystick.c:173: undefined reference to `joyGetDevCapsA@12'

[and many more i had to cut out to post this question]

collect2.exe: error: ld returned 1 exit status
</code></pre>

<p>I even tried to build the SDL2 source myself using the msys shell and mingws make, and i don't have the libSDL2main.a file, but apperently, i don't need that with my own-built version of SDL2. But i still get the same result.</p>

<p>I also searched on google, but nobody seems to have that problem besides me. Did i forget something or did i do something wrong?</p>

<p>By the way, i also have glew installed, but my problems seem to be SDL2 specific. Here is all my source code although i doubt, that the problem is in there.</p>

<pre><code>#include &lt;iostream&gt;
#include &lt;SDL.h&gt;
#include &lt;glew.h&gt;

int main(int argc, char* argv[])
{
    SDL_Init(SDL_INIT_EVERYTHING);
    std::cout &lt;&lt; "Hello World!" &lt;&lt; std::endl;
    SDL_Quit();
    return 0;
}
</code></pre>

<p>EDIT:</p>

<p>I don't understand, why the heck this should be a duplicate of the question linked above, this are two completeley different topics! I know, when this error occures (during the linking phase of building a program), i already know that, but i can't find the reason, i get mine.</p>

<p>I set up SDL2 as i should in order to get it to work, i set the library paths and specified the libraries in the correct order in that they have to be used/initiliazed/whatever. And if you look at the output of the build console, you could clearly see that. But i still get thousand of errors, that should not be there as far as i know. And i don't think, i have to explain, what differs this question from the question linked above, because i think, that one can quite clearly see that, i think that i need an explanation of why this should be a duplicate.</p>