Linker-Fehler von SDL2 in meinem Projekt

Ich habe CMake und Code :: Blocks verwendet, um SDL2 aus dem Quellcode zu erstellen, und habe versucht, meinen eigenen Projektquellcode mit den folgenden statischen Bibliotheken zu verknüpfen:

libSDL2.a
libSDL2main.a
OpenGL32.lib

Diese drei Bibliotheken befinden sich im Verzeichnis%libdir% (Ich verwende Batch für den Befehl).

Ich habe libSDL2 und libSDL2main aus dem Code :: Blocks Build erhalten. Ich habe OpenGL32 aus meinem Windows-Verzeichnis erhalten, obwohl ich es vor langer Zeit gefunden habe, sodass ich den genauen Speicherort nicht mehr ermitteln kann. Ich habe den folgenden Befehl verwendet:

g++ *.o -L%libDir% -lOpenGL32 -lSDL2main -lSDL -o "output.exe"

Below ist das Protokoll, wie kann ich diese Fehler beheben?:

projectdir\lib/libSDL2.a(SDL_windows.c.obj): In function `WIN_CoInitialize':
sdlsrc/core/windows/SDL_windows.c:73: undefined reference to `CoInitializeEx@8'
sdlsrc/core/windows/SDL_windows.c:75: undefined reference to `CoInitializeEx@8'
projectdir\lib/libSDL2.a(SDL_windows.c.obj): In function `WIN_CoUninitialize':
sdlsrc/core/windows/SDL_windows.c:92: undefined reference to `CoUninitialize@0'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `IME_SetupAPI':
sdlsrc/video/windows/SDL_windowskeyboard.c:617: undefined reference to `ImmGetIMEFileNameA@12'
sdlsrc/video/windows/SDL_windowskeyboard.c:630: undefined reference to `ImmGetContext@4'
sdlsrc/video/windows/SDL_windowskeyboard.c:633: undefined reference to `ImmReleaseContext@8'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `IME_GetId':
sdlsrc/video/windows/SDL_windowskeyboard.c:551: undefined reference to `ImmGetIMEFileNameA@12'
sdlsrc/video/windows/SDL_windowskeyboard.c:566: undefined reference to `GetFileVersionInfoSizeA@8'
sdlsrc/video/windows/SDL_windowskeyboard.c:570: undefined reference to `GetFileVersionInfoA@16'
sdlsrc/video/windows/SDL_windowskeyboard.c:571: undefined reference to `VerQueryValueA@16'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `UIElementSink_QueryInterface@12':
sdlsrc/video/windows/SDL_windowskeyboard.c:1013: undefined reference to `IID_IUnknown'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `IPPASink_QueryInterface@12':
sdlsrc/video/windows/SDL_windowskeyboard.c:1119: undefined reference to `IID_IUnknown'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `UILess_GetCandidateList':
sdlsrc/video/windows/SDL_windowskeyboard.c:984: undefined reference to `SysFreeString@4'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `IME_ClearComposition':
sdlsrc/video/windows/SDL_windowskeyboard.c:683: undefined reference to `ImmGetContext@4'
sdlsrc/video/windows/SDL_windowskeyboard.c:687: undefined reference to `ImmNotifyIME@16'
sdlsrc/video/windows/SDL_windowskeyboard.c:691: undefined reference to `ImmNotifyIME@16'
sdlsrc/video/windows/SDL_windowskeyboard.c:692: undefined reference to `ImmReleaseContext@8'
sdlsrc/video/windows/SDL_windowskeyboard.c:689: undefined reference to `ImmSetCompositionStringW@24'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `IME_Disable':
sdlsrc/video/windows/SDL_windowskeyboard.c:364: undefined reference to `ImmAssociateContext@8'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `UIElementSink_BeginUIElement@12':
sdlsrc/video/windows/SDL_windowskeyboard.c:1051: undefined reference to `SysFreeString@4'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `UIElementSink_UpdateUIElement@8':
sdlsrc/video/windows/SDL_windowskeyboard.c:1078: undefined reference to `SysFreeString@4'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `IME_Init':
sdlsrc/video/windows/SDL_windowskeyboard.c:309: undefined reference to `CoCreateInstance@20'
sdlsrc/video/windows/SDL_windowskeyboard.c:323: undefined reference to `ImmGetContext@4'
sdlsrc/video/windows/SDL_windowskeyboard.c:324: undefined reference to `ImmReleaseContext@8'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `UILess_SetupSinks':
sdlsrc/video/windows/SDL_windowskeyboard.c:1192: undefined reference to `CoCreateInstance@20'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `IME_ClearComposition':
sdlsrc/video/windows/SDL_windowskeyboard.c:683: undefined reference to `ImmGetContext@4'
sdlsrc/video/windows/SDL_windowskeyboard.c:687: undefined reference to `ImmNotifyIME@16'
sdlsrc/video/windows/SDL_windowskeyboard.c:691: undefined reference to `ImmNotifyIME@16'
sdlsrc/video/windows/SDL_windowskeyboard.c:692: undefined reference to `ImmReleaseContext@8'
sdlsrc/video/windows/SDL_windowskeyboard.c:689: undefined reference to `ImmSetCompositionStringW@24'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `IME_GetId':
sdlsrc/video/windows/SDL_windowskeyboard.c:551: undefined reference to `ImmGetIMEFileNameA@12'
sdlsrc/video/windows/SDL_windowskeyboard.c:566: undefined reference to `GetFileVersionInfoSizeA@8'
sdlsrc/video/windows/SDL_windowskeyboard.c:570: undefined reference to `GetFileVersionInfoA@16'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `IME_GetReadingString':
sdlsrc/video/windows/SDL_windowskeyboard.c:423: undefined reference to `ImmGetContext@4'
sdlsrc/video/windows/SDL_windowskeyboard.c:498: undefined reference to `ImmReleaseContext@8'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `IME_GetId':
sdlsrc/video/windows/SDL_windowskeyboard.c:571: undefined reference to `VerQueryValueA@16'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `IME_Quit':
sdlsrc/video/windows/SDL_windowskeyboard.c:378: undefined reference to `ImmAssociateContext@8'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `IME_Enable':
sdlsrc/video/windows/SDL_windowskeyboard.c:349: undefined reference to `ImmAssociateContext@8'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `IME_ClearComposition':
sdlsrc/video/windows/SDL_windowskeyboard.c:683: undefined reference to `ImmGetContext@4'
sdlsrc/video/windows/SDL_windowskeyboard.c:687: undefined reference to `ImmNotifyIME@16'
sdlsrc/video/windows/SDL_windowskeyboard.c:691: undefined reference to `ImmNotifyIME@16'
sdlsrc/video/windows/SDL_windowskeyboard.c:692: undefined reference to `ImmReleaseContext@8'
sdlsrc/video/windows/SDL_windowskeyboard.c:689: undefined reference to `ImmSetCompositionStringW@24'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `IME_Disable':
sdlsrc/video/windows/SDL_windowskeyboard.c:364: undefined reference to `ImmAssociateContext@8'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `WIN_SetTextInputRect':
sdlsrc/video/windows/SDL_windowskeyboard.c:202: undefined reference to `ImmGetContext@4'
sdlsrc/video/windows/SDL_windowskeyboard.c:209: undefined reference to `ImmSetCompositionWindow@8'
sdlsrc/video/windows/SDL_windowskeyboard.c:210: undefined reference to `ImmReleaseContext@8'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `IME_HandleMessage':
sdlsrc/video/windows/SDL_windowskeyboard.c:852: undefined reference to `ImmGetContext@4'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `IME_GetCompositionString':
sdlsrc/video/windows/SDL_windowskeyboard.c:699: undefined reference to `ImmGetCompositionStringW@16'
sdlsrc/video/windows/SDL_windowskeyboard.c:704: undefined reference to `ImmGetCompositionStringW@16'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `IME_HandleMessage':
sdlsrc/video/windows/SDL_windowskeyboard.c:890: undefined reference to `ImmReleaseContext@8'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `IME_ClearComposition':
sdlsrc/video/windows/SDL_windowskeyboard.c:683: undefined reference to `ImmGetContext@4'
sdlsrc/video/windows/SDL_windowskeyboard.c:687: undefined reference to `ImmNotifyIME@16'
sdlsrc/video/windows/SDL_windowskeyboard.c:691: undefined reference to `ImmNotifyIME@16'
sdlsrc/video/windows/SDL_windowskeyboard.c:692: undefined reference to `ImmReleaseContext@8'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `IME_HandleMessage':
sdlsrc/video/windows/SDL_windowskeyboard.c:885: undefined reference to `ImmGetContext@4'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `IME_GetCandidateList':
sdlsrc/video/windows/SDL_windowskeyboard.c:767: undefined reference to `ImmGetCandidateListW@16'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `IME_GetCompositionString':
sdlsrc/video/windows/SDL_windowskeyboard.c:699: undefined reference to `ImmGetCompositionStringW@16'
sdlsrc/video/windows/SDL_windowskeyboard.c:704: undefined reference to `ImmGetCompositionStringW@16'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `IME_ClearComposition':
sdlsrc/video/windows/SDL_windowskeyboard.c:689: undefined reference to `ImmSetCompositionStringW@24'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `IME_GetCandidateList':
sdlsrc/video/windows/SDL_windowskeyboard.c:771: undefined reference to `ImmGetCandidateListW@16'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `IME_Render':
sdlsrc/video/windows/SDL_windowskeyboard.c:1520: undefined reference to `CreateCompatibleDC@4'
sdlsrc/video/windows/SDL_windowskeyboard.c:1525: undefined reference to `DeleteDC@4'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `IME_RenderCandidateList':
sdlsrc/video/windows/SDL_windowskeyboard.c:1394: undefined reference to `CreatePen@12'
sdlsrc/video/windows/SDL_windowskeyboard.c:1395: undefined reference to `CreateSolidBrush@4'
sdlsrc/video/windows/SDL_windowskeyboard.c:1396: undefined reference to `CreatePen@12'
sdlsrc/video/windows/SDL_windowskeyboard.c:1397: undefined reference to `CreateSolidBrush@4'
sdlsrc/video/windows/SDL_windowskeyboard.c:1398: undefined reference to `CreatePen@12'
sdlsrc/video/windows/SDL_windowskeyboard.c:1399: undefined reference to `CreateSolidBrush@4'
sdlsrc/video/windows/SDL_windowskeyboard.c:1400: undefined reference to `CreateFontW@56'
sdlsrc/video/windows/SDL_windowskeyboard.c:1402: undefined reference to `SetBkMode@8'
sdlsrc/video/windows/SDL_windowskeyboard.c:1403: undefined reference to `SelectObject@8'
sdlsrc/video/windows/SDL_windowskeyboard.c:1410: undefined reference to `GetTextExtentPoint32W@16'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `StartDrawToBitmap':
sdlsrc/video/windows/SDL_windowskeyboard.c:1259: undefined reference to `CreateDIBSection@24'
sdlsrc/video/windows/SDL_windowskeyboard.c:1261: undefined reference to `SelectObject@8'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `IME_RenderCandidateList':
sdlsrc/video/windows/SDL_windowskeyboard.c:1458: undefined reference to `SelectObject@8'
sdlsrc/video/windows/SDL_windowskeyboard.c:1459: undefined reference to `SelectObject@8'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `DrawRect':
sdlsrc/video/windows/SDL_windowskeyboard.c:1285: undefined reference to `Rectangle@20'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `IME_RenderCandidateList':
sdlsrc/video/windows/SDL_windowskeyboard.c:1462: undefined reference to `SelectObject@8'
sdlsrc/video/windows/SDL_windowskeyboard.c:1463: undefined reference to `SelectObject@8'
sdlsrc/video/windows/SDL_windowskeyboard.c:1464: undefined reference to `SetTextColor@8'
sdlsrc/video/windows/SDL_windowskeyboard.c:1465: undefined reference to `SetBkMode@8'
sdlsrc/video/windows/SDL_windowskeyboard.c:1496: undefined reference to `SelectObject@8'
sdlsrc/video/windows/SDL_windowskeyboard.c:1497: undefined reference to `SelectObject@8'
sdlsrc/video/windows/SDL_windowskeyboard.c:1498: undefined reference to `SetTextColor@8'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `DrawRect':
sdlsrc/video/windows/SDL_windowskeyboard.c:1285: undefined reference to `Rectangle@20'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `IME_RenderCandidateList':
sdlsrc/video/windows/SDL_windowskeyboard.c:1502: undefined reference to `ExtTextOutW@32'
sdlsrc/video/windows/SDL_windowskeyboard.c:1491: undefined reference to `SelectObject@8'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `StopDrawToBitmap':
sdlsrc/video/windows/SDL_windowskeyboard.c:1270: undefined reference to `DeleteObject@4'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `IME_RenderCandidateList':
sdlsrc/video/windows/SDL_windowskeyboard.c:1506: undefined reference to `DeleteObject@4'
sdlsrc/video/windows/SDL_windowskeyboard.c:1507: undefined reference to `DeleteObject@4'
sdlsrc/video/windows/SDL_windowskeyboard.c:1508: undefined reference to `DeleteObject@4'
sdlsrc/video/windows/SDL_windowskeyboard.c:1509: undefined reference to `DeleteObject@4'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj):sdlsrc/video/windows/SDL_windowskeyboard.c:1510: more undefined references to `DeleteObject@4' follow
projectdir\lib/libSDL2.a(SDL_windowsmessagebox.c.obj): In function `WIN_ShowMessageBox':
sdlsrc/video/windows/SDL_windowsmessagebox.c:396: undefined reference to `CreateCompatibleDC@4'
sdlsrc/video/windows/SDL_windowsmessagebox.c:405: undefined reference to `CreateFontIndirectW@4'
sdlsrc/video/windows/SDL_windowsmessagebox.c:409: undefined reference to `SelectObject@8'
sdlsrc/video/windows/SDL_windowsmessagebox.c:413: undefined reference to `GetTextMetricsW@8'
sdlsrc/video/windows/SDL_windowsmessagebox.c:428: undefined reference to `DeleteDC@4'
projectdir\lib/libSDL2.a(SDL_windowsmessagebox.c.obj): In function `CreateDialogData':
sdlsrc/video/windows/SDL_windowsmessagebox.c:301: undefined reference to `GetDeviceCaps@8'
projectdir\lib/libSDL2.a(SDL_windowsmouse.c.obj): In function `WIN_CreateCursor':
sdlsrc/video/windows/SDL_windowsmouse.c:129: undefined reference to `CreateDIBSection@24'
sdlsrc/video/windows/SDL_windowsmouse.c:130: undefined reference to `CreateBitmap@20'
sdlsrc/video/windows/SDL_windowsmouse.c:140: undefined reference to `DeleteObject@4'
sdlsrc/video/windows/SDL_windowsmouse.c:141: undefined reference to `DeleteObject@4'
projectdir\lib/libSDL2.a(SDL_windowsshape.c.obj): In function `CombineRectRegions':
sdlsrc/video/windows/SDL_windowsshape.c:53: undefined reference to `CreateRectRgn@16'
sdlsrc/video/windows/SDL_windowsshape.c:55: undefined reference to `CombineRgn@16'
sdlsrc/video/windows/SDL_windowsshape.c:56: undefined reference to `DeleteObject@4'
projectdir\lib/libSDL2.a(SDL_windowswindow.c.obj): In function `WIN_SetWindowGammaRamp':
sdlsrc/video/windows/SDL_windowswindow.c:606: undefined reference to `CreateDCW@16'
sdlsrc/video/windows/SDL_windowswindow.c:608: undefined reference to `SetDeviceGammaRamp@8'
sdlsrc/video/windows/SDL_windowswindow.c:612: undefined reference to `DeleteDC@4'
projectdir\lib/libSDL2.a(SDL_windowswindow.c.obj): In function `WIN_GetWindowGammaRamp':
sdlsrc/video/windows/SDL_windowswindow.c:625: undefined reference to `CreateDCW@16'
sdlsrc/video/windows/SDL_windowswindow.c:627: undefined reference to `GetDeviceGammaRamp@8'
sdlsrc/video/windows/SDL_windowswindow.c:631: undefined reference to `DeleteDC@4'
projectdir\lib/libSDL2.a(SDL_systimer.c.obj): In function `SDL_SetSystemTimerResolution':
sdlsrc/timer/windows/SDL_systimer.c:57: undefined reference to `timeBeginPeriod@4'
sdlsrc/timer/windows/SDL_systimer.c:51: undefined reference to `timeEndPeriod@4'
projectdir\lib/libSDL2.a(SDL_systimer.c.obj): In function `SDL_TicksInit':
sdlsrc/timer/windows/SDL_systimer.c:102: undefined reference to `timeGetTime@0'
projectdir\lib/libSDL2.a(SDL_systimer.c.obj): In function `SDL_SetSystemTimerResolution':
sdlsrc/timer/windows/SDL_systimer.c:51: undefined reference to `timeEndPeriod@4'
projectdir\lib/libSDL2.a(SDL_systimer.c.obj): In function `SDL_GetTicks_REAL':
sdlsrc/timer/windows/SDL_systimer.c:141: undefined reference to `timeGetTime@0'
projectdir\lib/libSDL2.a(SDL_systimer.c.obj): In function `SDL_TicksInit':
sdlsrc/timer/windows/SDL_systimer.c:102: undefined reference to `timeGetTime@0'
projectdir\lib/libSDL2.a(SDL_systimer.c.obj): In function `SDL_GetTicks_REAL':
sdlsrc/timer/windows/SDL_systimer.c:141: undefined reference to `timeGetTime@0'
projectdir\lib/libSDL2.a(SDL_systimer.c.obj): In function `SDL_TicksInit':
sdlsrc/timer/windows/SDL_systimer.c:102: undefined reference to `timeGetTime@0'
projectdir\lib/libSDL2.a(SDL_mmjoystick.c.obj): In function `SDL_SYS_JoystickInit':
sdlsrc/joystick/windows/SDL_mmjoystick.c:166: undefined reference to `joyGetNumDevs@0'
sdlsrc/joystick/windows/SDL_mmjoystick.c:171: undefined reference to `joyGetPosEx@8'
sdlsrc/joystick/windows/SDL_mmjoystick.c:173: undefined reference to `joyGetDevCapsA@12'
projectdir\lib/libSDL2.a(SDL_mmjoystick.c.obj): In function `SDL_SYS_JoystickUpdate':
sdlsrc/joystick/windows/SDL_mmjoystick.c:326: undefined reference to `joyGetPosEx@8'
projectdir\lib/libSDL2.a(SDL_winmm.c.obj): In function `WINMM_CloseDevice':
sdlsrc/audio/winmm/SDL_winmm.c:170: undefined reference to `waveOutUnprepareHeader@12'
sdlsrc/audio/winmm/SDL_winmm.c:170: undefined reference to `waveOutUnprepareHeader@12'
sdlsrc/audio/winmm/SDL_winmm.c:182: undefined reference to `waveInClose@4'
sdlsrc/audio/winmm/SDL_winmm.c:187: undefined reference to `waveOutClose@4'
projectdir\lib/libSDL2.a(SDL_winmm.c.obj): In function `WINMM_PlayDevice':
sdlsrc/audio/winmm/SDL_winmm.c:131: undefined reference to `waveOutWrite@12'
projectdir\lib/libSDL2.a(SDL_winmm.c.obj): In function `SetMMerror':
sdlsrc/audio/winmm/SDL_winmm.c:106: undefined reference to `waveOutGetErrorTextW@12'
projectdir\lib/libSDL2.a(SDL_winmm.c.obj): In function `WINMM_OpenDevice':
sdlsrc/audio/winmm/SDL_winmm.c:285: undefined reference to `waveOutOpen@24'
sdlsrc/audio/winmm/SDL_winmm.c:331: undefined reference to `waveOutPrepareHeader@12'
projectdir\lib/libSDL2.a(SDL_winmm.c.obj): In function `PrepWaveFormat':
sdlsrc/audio/winmm/SDL_winmm.c:216: undefined reference to `waveOutOpen@24'
sdlsrc/audio/winmm/SDL_winmm.c:214: undefined reference to `waveInOpen@24'
projectdir\lib/libSDL2.a(SDL_winmm.c.obj): In function `WINMM_OpenDevice':
sdlsrc/audio/winmm/SDL_winmm.c:281: undefined reference to `waveInOpen@24'
projectdir\lib/libSDL2.a(SDL_winmm.c.obj): In function `DetectWaveInDevs':
sdlsrc/audio/winmm/SDL_winmm.c:57: undefined reference to `waveInGetNumDevs@0'
sdlsrc/audio/winmm/SDL_winmm.c:57: undefined reference to `waveInGetDevCapsW@12'
projectdir\lib/libSDL2.a(SDL_winmm.c.obj): In function `DetectWaveOutDevs':
sdlsrc/audio/winmm/SDL_winmm.c:56: undefined reference to `waveOutGetNumDevs@0'
sdlsrc/audio/winmm/SDL_winmm.c:56: undefined reference to `waveOutGetDevCapsW@12'
projectdir\lib/libSDL2.a(SDL_windowsframebuffer.c.obj): In function `WIN_CreateWindowFramebuffer':
sdlsrc/video/windows/SDL_windowsframebuffer.c:36: undefined reference to `DeleteDC@4'
sdlsrc/video/windows/SDL_windowsframebuffer.c:39: undefined reference to `DeleteObject@4'
sdlsrc/video/windows/SDL_windowsframebuffer.c:53: undefined reference to `CreateCompatibleBitmap@12'
sdlsrc/video/windows/SDL_windowsframebuffer.c:54: undefined reference to `GetDIBits@28'
sdlsrc/video/windows/SDL_windowsframebuffer.c:55: undefined reference to `GetDIBits@28'
sdlsrc/video/windows/SDL_windowsframebuffer.c:56: undefined reference to `DeleteObject@4'
sdlsrc/video/windows/SDL_windowsframebuffer.c:86: undefined reference to `CreateCompatibleDC@4'
sdlsrc/video/windows/SDL_windowsframebuffer.c:87: undefined reference to `CreateDIBSection@24'
sdlsrc/video/windows/SDL_windowsframebuffer.c:93: undefined reference to `SelectObject@8'
projectdir\lib/libSDL2.a(SDL_windowsframebuffer.c.obj): In function `WIN_UpdateWindowFramebuffer':
sdlsrc/video/windows/SDL_windowsframebuffer.c:102: undefined reference to `BitBlt@36'
projectdir\lib/libSDL2.a(SDL_windowsframebuffer.c.obj): In function `WIN_DestroyWindowFramebuffer':
sdlsrc/video/windows/SDL_windowsframebuffer.c:116: undefined reference to `DeleteDC@4'
sdlsrc/video/windows/SDL_windowsframebuffer.c:120: undefined reference to `DeleteObject@4'
projectdir\lib/libSDL2.a(SDL_windowsmodes.c.obj): In function `WIN_GetDisplayMode':
sdlsrc/video/windows/SDL_windowsmodes.c:108: undefined reference to `CreateDCW@16'
sdlsrc/video/windows/SDL_windowsmodes.c:112: undefined reference to `GetDeviceCaps@8'
sdlsrc/video/windows/SDL_windowsmodes.c:113: undefined reference to `GetDeviceCaps@8'
sdlsrc/video/windows/SDL_windowsmodes.c:153: undefined reference to `CreateCompatibleBitmap@12'
sdlsrc/video/windows/SDL_windowsmodes.c:154: undefined reference to `GetDIBits@28'
sdlsrc/video/windows/SDL_windowsmodes.c:155: undefined reference to `GetDIBits@28'
sdlsrc/video/windows/SDL_windowsmodes.c:156: undefined reference to `DeleteObject@4'
sdlsrc/video/windows/SDL_windowsmodes.c:157: undefined reference to `DeleteDC@4'
sdlsrc/video/windows/SDL_windowsmodes.c:137: undefined reference to `GetDeviceCaps@8'
sdlsrc/video/windows/SDL_windowsmodes.c:138: undefined reference to `GetDeviceCaps@8'
sdlsrc/video/windows/SDL_windowsmodes.c:145: undefined reference to `GetDeviceCaps@8'
sdlsrc/video/windows/SDL_windowsmodes.c:144: undefined reference to `GetDeviceCaps@8'
sdlsrc/video/windows/SDL_windowsmodes.c:108: undefined reference to `CreateDCW@16'
sdlsrc/video/windows/SDL_windowsmodes.c:112: undefined reference to `GetDeviceCaps@8'
sdlsrc/video/windows/SDL_windowsmodes.c:113: undefined reference to `GetDeviceCaps@8'
sdlsrc/video/windows/SDL_windowsmodes.c:153: undefined reference to `CreateCompatibleBitmap@12'
sdlsrc/video/windows/SDL_windowsmodes.c:154: undefined reference to `GetDIBits@28'
sdlsrc/video/windows/SDL_windowsmodes.c:155: undefined reference to `GetDIBits@28'
sdlsrc/video/windows/SDL_windowsmodes.c:156: undefined reference to `DeleteObject@4'
sdlsrc/video/windows/SDL_windowsmodes.c:157: undefined reference to `DeleteDC@4'
sdlsrc/video/windows/SDL_windowsmodes.c:137: undefined reference to `GetDeviceCaps@8'
sdlsrc/video/windows/SDL_windowsmodes.c:138: undefined reference to `GetDeviceCaps@8'
sdlsrc/video/windows/SDL_windowsmodes.c:145: undefined reference to `GetDeviceCaps@8'
sdlsrc/video/windows/SDL_windowsmodes.c:144: undefined reference to `GetDeviceCaps@8'
projectdir\lib/libSDL2.a(SDL_windowsopengl.c.obj): In function `WIN_GL_ChoosePixelFormatARB':
sdlsrc/video/windows/SDL_windowsopengl.c:446: undefined reference to `ChoosePixelFormat@8'
sdlsrc/video/windows/SDL_windowsopengl.c:446: undefined reference to `SetPixelFormat@12'
projectdir\lib/libSDL2.a(SDL_windowsopengl.c.obj): In function `WIN_GL_ChoosePixelFormat':
sdlsrc/video/windows/SDL_windowsopengl.c:208: undefined reference to `DescribePixelFormat@16'
sdlsrc/video/windows/SDL_windowsopengl.c:212: undefined reference to `DescribePixelFormat@16'
projectdir\lib/libSDL2.a(SDL_windowsopengl.c.obj): In function `WIN_GL_SetupWindowInternal':
sdlsrc/video/windows/SDL_windowsopengl.c:579: undefined reference to `SetPixelFormat@12'
projectdir\lib/libSDL2.a(SDL_windowsopengl.c.obj): In function `WIN_GL_InitExtensions':
sdlsrc/video/windows/SDL_windowsopengl.c:360: undefined reference to `ChoosePixelFormat@8'
sdlsrc/video/windows/SDL_windowsopengl.c:360: undefined reference to `SetPixelFormat@12'
projectdir\lib/libSDL2.a(SDL_windowsopengl.c.obj): In function `WIN_GL_SwapWindow':
sdlsrc/video/windows/SDL_windowsopengl.c:774: undefined reference to `SwapBuffers@4'
projectdir\lib/libSDL2.a(SDL_windowsopengl.c.obj): In function `WIN_GL_SetPixelFormatFrom':
sdlsrc/video/windows/SDL_windowsopengl.c:795: undefined reference to `GetPixelFormat@4'
sdlsrc/video/windows/SDL_windowsopengl.c:798: undefined reference to `DescribePixelFormat@16'
sdlsrc/video/windows/SDL_windowsopengl.c:801: undefined reference to `SetPixelFormat@12'
collect2.exe: error: ld returned 1 exit status

Ich habe vermutet, dass ich möglicherweise Windows-Bibliotheken bereitstellen muss (ich verwende Windows 10)? Wenn ja, welche Bibliotheken brauche ich und wo finde ich sie? Warum ist dieses Problem nicht aufgetreten, als ich eine vorgefertigte Version von SDL2 verwendet habe?

Antworten auf die Frage(4)

Ihre Antwort auf die Frage