Я использовал CMake и Code :: Blocks для создания SDL2 из источника, и попытался связать свой собственный источник проекта для следующих статических библиотек:компоновщик ошибка из SDL2 в моем проекте
libSDL2.a
libSDL2main.a
OpenGL32.lib
Этих три библиотек содержатся в каталоге, известном как %libdir%
(я использую Batch для команды).
Я получил libSDL2 и libSDL2main из сборки Code :: Blocks. Я получил OpenGL32 из моего каталога Windows, хотя я нашел его давно, поэтому я не могу вспомнить точное местоположение. Я использовал следующую команду:
g++ *.o -L%libDir% -lOpenGL32 -lSDL2main -lSDL -o "output.exe"
Ниже приведен журнал, как я могу исправить эти ошибки ?:
projectdir\lib/libSDL2.a(SDL_windows.c.obj): In function `WIN_CoInitialize':
sdlsrc/core/windows/SDL_windows.c:73: undefined reference to `[email protected]'
sdlsrc/core/windows/SDL_windows.c:75: undefined reference to `[email protected]'
projectdir\lib/libSDL2.a(SDL_windows.c.obj): In function `WIN_CoUninitialize':
sdlsrc/core/windows/SDL_windows.c:92: undefined reference to `[email protected]'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `IME_SetupAPI':
sdlsrc/video/windows/SDL_windowskeyboard.c:617: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowskeyboard.c:630: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowskeyboard.c:633: undefined reference to `[email protected]'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `IME_GetId':
sdlsrc/video/windows/SDL_windowskeyboard.c:551: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowskeyboard.c:566: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowskeyboard.c:570: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowskeyboard.c:571: undefined reference to `[email protected]'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `[email protected]':
sdlsrc/video/windows/SDL_windowskeyboard.c:1013: undefined reference to `IID_IUnknown'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `[email protected]':
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 `[email protected]'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `IME_ClearComposition':
sdlsrc/video/windows/SDL_windowskeyboard.c:683: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowskeyboard.c:687: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowskeyboard.c:691: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowskeyboard.c:692: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowskeyboard.c:689: undefined reference to `[email protected]'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `IME_Disable':
sdlsrc/video/windows/SDL_windowskeyboard.c:364: undefined reference to `[email protected]'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `[email protected]':
sdlsrc/video/windows/SDL_windowskeyboard.c:1051: undefined reference to `[email protected]'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `[email protected]':
sdlsrc/video/windows/SDL_windowskeyboard.c:1078: undefined reference to `[email protected]'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `IME_Init':
sdlsrc/video/windows/SDL_windowskeyboard.c:309: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowskeyboard.c:323: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowskeyboard.c:324: undefined reference to `[email protected]'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `UILess_SetupSinks':
sdlsrc/video/windows/SDL_windowskeyboard.c:1192: undefined reference to `[email protected]'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `IME_ClearComposition':
sdlsrc/video/windows/SDL_windowskeyboard.c:683: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowskeyboard.c:687: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowskeyboard.c:691: undefined reference to `ImmNo[email protected]'
sdlsrc/video/windows/SDL_windowskeyboard.c:692: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowskeyboard.c:689: undefined reference to `[email protected]'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `IME_GetId':
sdlsrc/video/windows/SDL_windowskeyboard.c:551: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowskeyboard.c:566: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowskeyboard.c:570: undefined reference to `[email protected]'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `IME_GetReadingString':
sdlsrc/video/windows/SDL_windowskeyboard.c:423: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowskeyboard.c:498: undefined reference to `[email protected]'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `IME_GetId':
sdlsrc/video/windows/SDL_windowskeyboard.c:571: undefined reference to `[email protected]'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `IME_Quit':
sdlsrc/video/windows/SDL_windowskeyboard.c:378: undefined reference to `[email protected]'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `IME_Enable':
sdlsrc/video/windows/SDL_windowskeyboard.c:349: undefined reference to `[email protected]'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `IME_ClearComposition':
sdlsrc/video/windows/SDL_windowskeyboard.c:683: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowskeyboard.c:687: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowskeyboard.c:691: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowskeyboard.c:692: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowskeyboard.c:689: undefined reference to `[email protected]'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `IME_Disable':
sdlsrc/video/windows/SDL_windowskeyboard.c:364: undefined reference to `[email protected]'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `WIN_SetTextInputRect':
sdlsrc/video/windows/SDL_windowskeyboard.c:202: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowskeyboard.c:209: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowskeyboard.c:210: undefined reference to `[email protected]'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `IME_HandleMessage':
sdlsrc/video/windows/SDL_windowskeyboard.c:852: undefined reference to `[email protected]'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `IME_GetCompositionString':
sdlsrc/video/windows/SDL_windowskeyboard.c:699: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowskeyboard.c:704: undefined reference to `[email protected]'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `IME_HandleMessage':
sdlsrc/video/windows/SDL_windowskeyboard.c:890: undefined reference to `[email protected]'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `IME_ClearComposition':
sdlsrc/video/windows/SDL_windowskeyboard.c:683: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowskeyboard.c:687: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowskeyboard.c:691: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowskeyboard.c:692: undefined reference to `[email protected]'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `IME_HandleMessage':
sdlsrc/video/windows/SDL_windowskeyboard.c:885: undefined reference to `[email protected]'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `IME_GetCandidateList':
sdlsrc/video/windows/SDL_windowskeyboard.c:767: undefined reference to `[email protected]'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `IME_GetCompositionString':
sdlsrc/video/windows/SDL_windowskeyboard.c:699: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowskeyboard.c:704: undefined reference to `[email protected]'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `IME_ClearComposition':
sdlsrc/video/windows/SDL_windowskeyboard.c:689: undefined reference to `[email protected]'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `IME_GetCandidateList':
sdlsrc/video/windows/SDL_windowskeyboard.c:771: undefined reference to `[email protected]'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `IME_Render':
sdlsrc/video/windows/SDL_windowskeyboard.c:1520: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowskeyboard.c:1525: undefined reference to `[email protected]'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `IME_RenderCandidateList':
sdlsrc/video/windows/SDL_windowskeyboard.c:1394: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowskeyboard.c:1395: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowskeyboard.c:1396: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowskeyboard.c:1397: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowskeyboard.c:1398: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowskeyboard.c:1399: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowskeyboard.c:1400: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowskeyboard.c:1402: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowskeyboard.c:1403: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowskeyboard.c:1410: undefined reference to `[email protected]'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `StartDrawToBitmap':
sdlsrc/video/windows/SDL_windowskeyboard.c:1259: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowskeyboard.c:1261: undefined reference to `[email protected]'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `IME_RenderCandidateList':
sdlsrc/video/windows/SDL_windowskeyboard.c:1458: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowskeyboard.c:1459: undefined reference to `[email protected]'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `DrawRect':
sdlsrc/video/windows/SDL_windowskeyboard.c:1285: undefined reference to `[email protected]'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `IME_RenderCandidateList':
sdlsrc/video/windows/SDL_windowskeyboard.c:1462: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowskeyboard.c:1463: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowskeyboard.c:1464: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowskeyboard.c:1465: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowskeyboard.c:1496: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowskeyboard.c:1497: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowskeyboard.c:1498: undefined reference to `[email protected]'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `DrawRect':
sdlsrc/video/windows/SDL_windowskeyboard.c:1285: undefined reference to `[email protected]'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `IME_RenderCandidateList':
sdlsrc/video/windows/SDL_windowskeyboard.c:1502: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowskeyboard.c:1491: undefined reference to `[email protected]'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `StopDrawToBitmap':
sdlsrc/video/windows/SDL_windowskeyboard.c:1270: undefined reference to `[email protected]'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj): In function `IME_RenderCandidateList':
sdlsrc/video/windows/SDL_windowskeyboard.c:1506: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowskeyboard.c:1507: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowskeyboard.c:1508: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowskeyboard.c:1509: undefined reference to `[email protected]'
projectdir\lib/libSDL2.a(SDL_windowskeyboard.c.obj):sdlsrc/video/windows/SDL_windowskeyboard.c:1510: more undefined references to `[email protected]' follow
projectdir\lib/libSDL2.a(SDL_windowsmessagebox.c.obj): In function `WIN_ShowMessageBox':
sdlsrc/video/windows/SDL_windowsmessagebox.c:396: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowsmessagebox.c:405: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowsmessagebox.c:409: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowsmessagebox.c:413: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowsmessagebox.c:428: undefined reference to `[email protected]'
projectdir\lib/libSDL2.a(SDL_windowsmessagebox.c.obj): In function `CreateDialogData':
sdlsrc/video/windows/SDL_windowsmessagebox.c:301: undefined reference to `[email protected]'
projectdir\lib/libSDL2.a(SDL_windowsmouse.c.obj): In function `WIN_CreateCursor':
sdlsrc/video/windows/SDL_windowsmouse.c:129: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowsmouse.c:130: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowsmouse.c:140: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowsmouse.c:141: undefined reference to `[email protected]'
projectdir\lib/libSDL2.a(SDL_windowsshape.c.obj): In function `CombineRectRegions':
sdlsrc/video/windows/SDL_windowsshape.c:53: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowsshape.c:55: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowsshape.c:56: undefined reference to `[email protected]'
projectdir\lib/libSDL2.a(SDL_windowswindow.c.obj): In function `WIN_SetWindowGammaRamp':
sdlsrc/video/windows/SDL_windowswindow.c:606: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowswindow.c:608: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowswindow.c:612: undefined reference to `[email protected]'
projectdir\lib/libSDL2.a(SDL_windowswindow.c.obj): In function `WIN_GetWindowGammaRamp':
sdlsrc/video/windows/SDL_windowswindow.c:625: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowswindow.c:627: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowswindow.c:631: undefined reference to `[email protected]'
projectdir\lib/libSDL2.a(SDL_systimer.c.obj): In function `SDL_SetSystemTimerResolution':
sdlsrc/timer/windows/SDL_systimer.c:57: undefined reference to `[email protected]'
sdlsrc/timer/windows/SDL_systimer.c:51: undefined reference to `[email protected]'
projectdir\lib/libSDL2.a(SDL_systimer.c.obj): In function `SDL_TicksInit':
sdlsrc/timer/windows/SDL_systimer.c:102: undefined reference to `[email protected]'
projectdir\lib/libSDL2.a(SDL_systimer.c.obj): In function `SDL_SetSystemTimerResolution':
sdlsrc/timer/windows/SDL_systimer.c:51: undefined reference to `[email protected]'
projectdir\lib/libSDL2.a(SDL_systimer.c.obj): In function `SDL_GetTicks_REAL':
sdlsrc/timer/windows/SDL_systimer.c:141: undefined reference to `[email protected]'
projectdir\lib/libSDL2.a(SDL_systimer.c.obj): In function `SDL_TicksInit':
sdlsrc/timer/windows/SDL_systimer.c:102: undefined reference to `[email protected]'
projectdir\lib/libSDL2.a(SDL_systimer.c.obj): In function `SDL_GetTicks_REAL':
sdlsrc/timer/windows/SDL_systimer.c:141: undefined reference to `[email protected]'
projectdir\lib/libSDL2.a(SDL_systimer.c.obj): In function `SDL_TicksInit':
sdlsrc/timer/windows/SDL_systimer.c:102: undefined reference to `[email protected]'
projectdir\lib/libSDL2.a(SDL_mmjoystick.c.obj): In function `SDL_SYS_JoystickInit':
sdlsrc/joystick/windows/SDL_mmjoystick.c:166: undefined reference to `[email protected]'
sdlsrc/joystick/windows/SDL_mmjoystick.c:171: undefined reference to `[email protected]'
sdlsrc/joystick/windows/SDL_mmjoystick.c:173: undefined reference to `[email protected]'
projectdir\lib/libSDL2.a(SDL_mmjoystick.c.obj): In function `SDL_SYS_JoystickUpdate':
sdlsrc/joystick/windows/SDL_mmjoystick.c:326: undefined reference to `[email protected]'
projectdir\lib/libSDL2.a(SDL_winmm.c.obj): In function `WINMM_CloseDevice':
sdlsrc/audio/winmm/SDL_winmm.c:170: undefined reference to `[email protected]'
sdlsrc/audio/winmm/SDL_winmm.c:170: undefined reference to `[email protected]'
sdlsrc/audio/winmm/SDL_winmm.c:182: undefined reference to `[email protected]'
sdlsrc/audio/winmm/SDL_winmm.c:187: undefined reference to `[email protected]'
projectdir\lib/libSDL2.a(SDL_winmm.c.obj): In function `WINMM_PlayDevice':
sdlsrc/audio/winmm/SDL_winmm.c:131: undefined reference to `[email protected]'
projectdir\lib/libSDL2.a(SDL_winmm.c.obj): In function `SetMMerror':
sdlsrc/audio/winmm/SDL_winmm.c:106: undefined reference to `[email protected]'
projectdir\lib/libSDL2.a(SDL_winmm.c.obj): In function `WINMM_OpenDevice':
sdlsrc/audio/winmm/SDL_winmm.c:285: undefined reference to `[email protected]'
sdlsrc/audio/winmm/SDL_winmm.c:331: undefined reference to `[email protected]'
projectdir\lib/libSDL2.a(SDL_winmm.c.obj): In function `PrepWaveFormat':
sdlsrc/audio/winmm/SDL_winmm.c:216: undefined reference to `[email protected]'
sdlsrc/audio/winmm/SDL_winmm.c:214: undefined reference to `[email protected]'
projectdir\lib/libSDL2.a(SDL_winmm.c.obj): In function `WINMM_OpenDevice':
sdlsrc/audio/winmm/SDL_winmm.c:281: undefined reference to `[email protected]'
projectdir\lib/libSDL2.a(SDL_winmm.c.obj): In function `DetectWaveInDevs':
sdlsrc/audio/winmm/SDL_winmm.c:57: undefined reference to `[email protected]'
sdlsrc/audio/winmm/SDL_winmm.c:57: undefined reference to `[email protected]'
projectdir\lib/libSDL2.a(SDL_winmm.c.obj): In function `DetectWaveOutDevs':
sdlsrc/audio/winmm/SDL_winmm.c:56: undefined reference to `[email protected]'
sdlsrc/audio/winmm/SDL_winmm.c:56: undefined reference to `[email protected]'
projectdir\lib/libSDL2.a(SDL_windowsframebuffer.c.obj): In function `WIN_CreateWindowFramebuffer':
sdlsrc/video/windows/SDL_windowsframebuffer.c:36: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowsframebuffer.c:39: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowsframebuffer.c:53: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowsframebuffer.c:54: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowsframebuffer.c:55: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowsframebuffer.c:56: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowsframebuffer.c:86: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowsframebuffer.c:87: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowsframebuffer.c:93: undefined reference to `[email protected]'
projectdir\lib/libSDL2.a(SDL_windowsframebuffer.c.obj): In function `WIN_UpdateWindowFramebuffer':
sdlsrc/video/windows/SDL_windowsframebuffer.c:102: undefined reference to `[email protected]'
projectdir\lib/libSDL2.a(SDL_windowsframebuffer.c.obj): In function `WIN_DestroyWindowFramebuffer':
sdlsrc/video/windows/SDL_windowsframebuffer.c:116: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowsframebuffer.c:120: undefined reference to `[email protected]'
projectdir\lib/libSDL2.a(SDL_windowsmodes.c.obj): In function `WIN_GetDisplayMode':
sdlsrc/video/windows/SDL_windowsmodes.c:108: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowsmodes.c:112: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowsmodes.c:113: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowsmodes.c:153: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowsmodes.c:154: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowsmodes.c:155: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowsmodes.c:156: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowsmodes.c:157: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowsmodes.c:137: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowsmodes.c:138: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowsmodes.c:145: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowsmodes.c:144: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowsmodes.c:108: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowsmodes.c:112: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowsmodes.c:113: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowsmodes.c:153: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowsmodes.c:154: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowsmodes.c:155: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowsmodes.c:156: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowsmodes.c:157: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowsmodes.c:137: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowsmodes.c:138: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowsmodes.c:145: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowsmodes.c:144: undefined reference to `[email protected]'
projectdir\lib/libSDL2.a(SDL_windowsopengl.c.obj): In function `WIN_GL_ChoosePixelFormatARB':
sdlsrc/video/windows/SDL_windowsopengl.c:446: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowsopengl.c:446: undefined reference to `[email protected]'
projectdir\lib/libSDL2.a(SDL_windowsopengl.c.obj): In function `WIN_GL_ChoosePixelFormat':
sdlsrc/video/windows/SDL_windowsopengl.c:208: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowsopengl.c:212: undefined reference to `[email protected]'
projectdir\lib/libSDL2.a(SDL_windowsopengl.c.obj): In function `WIN_GL_SetupWindowInternal':
sdlsrc/video/windows/SDL_windowsopengl.c:579: undefined reference to `[email protected]'
projectdir\lib/libSDL2.a(SDL_windowsopengl.c.obj): In function `WIN_GL_InitExtensions':
sdlsrc/video/windows/SDL_windowsopengl.c:360: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowsopengl.c:360: undefined reference to `[email protected]'
projectdir\lib/libSDL2.a(SDL_windowsopengl.c.obj): In function `WIN_GL_SwapWindow':
sdlsrc/video/windows/SDL_windowsopengl.c:774: undefined reference to `[email protected]'
projectdir\lib/libSDL2.a(SDL_windowsopengl.c.obj): In function `WIN_GL_SetPixelFormatFrom':
sdlsrc/video/windows/SDL_windowsopengl.c:795: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowsopengl.c:798: undefined reference to `[email protected]'
sdlsrc/video/windows/SDL_windowsopengl.c:801: undefined reference to `[email protected]'
collect2.exe: error: ld returned 1 exit status
Я подозревал, что, возможно, мне нужно предоставить библиотеки окна (я использую Windows 10)? Если это так, какие библиотеки мне нужны и где я могу их найти? Почему эта проблема не возникла, когда я использовал предварительно построенную версию SDL2?
Вам действительно нужно 'OpenGL32.lib'? Возможно, вам нужен загрузчик функций opengl (например, glew). Учитывая, что сборка try -lmingw32 -lSDL2main -lSDL2' связывает флаги и добавляет '-I $ {SDL2IncludeDir}' <- capital i. – mlkn
@mlkn Я добавил GLEW в свой проект. OpenGL32 необходим, не так ли? mingw32 не будет содержать функции OpenGL? Конечно, флаг -I также не нужен, поскольку компиляция в порядке, у меня есть все файлы .o, которые мне нужны; это ошибка компоновщика. – Harrand