Jump to content

  • Log In with Google      Sign In   
  • Create Account

SDL Odd Linker Errors


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
No replies to this topic

#1 Spirrwell   Members   -  Reputation: 265

Like
0Likes
Like

Posted 24 January 2013 - 02:19 PM

I'm having a problem with SDL (currently using SDL 2.0 but the same problem occurs when using SDL 1.2) when linking to it in Windows. I'm currently using Code::Blocks 12.11 and the code surely isn't the problem, I could write the same code before on different operating systems\computers without a problem it's just that SDL will not link properly and I'm thinking it may have to do with the way I built it with MSYS, so if that's the problem let me know.

 

Here's what I get:

 

||=== SDL2, Debug ===|
..\..\..\..\..\..\Program Files (x86)\CodeBlocks\MinGW\lib\libSDL2.a(SDL_systimer.o)||In function `SDL_StartTicks':|
c:\SDL-2.0.0-6799\src\timer\windows\SDL_systimer.c|59|undefined reference to `timeBeginPeriod@4'|
c:\SDL-2.0.0-6799\src\timer\windows\SDL_systimer.c|60|undefined reference to `timeGetTime@0'|
..\..\..\..\..\..\Program Files (x86)\CodeBlocks\MinGW\lib\libSDL2.a(SDL_systimer.o)||In function `SDL_GetTicks':|
c:\SDL-2.0.0-6799\src\timer\windows\SDL_systimer.c|85|undefined reference to `timeGetTime@0'|
..\..\..\..\..\..\Program Files (x86)\CodeBlocks\MinGW\lib\libSDL2.a(SDL_windowswindow.o)||In function `WIN_SetWindowGammaRamp':|
c:\SDL-2.0.0-6799\src\video\windows\SDL_windowswindow.c|511|undefined reference to `CreateDCW@16'|
c:\SDL-2.0.0-6799\src\video\windows\SDL_windowswindow.c|513|undefined reference to `SetDeviceGammaRamp@8'|
c:\SDL-2.0.0-6799\src\video\windows\SDL_windowswindow.c|517|undefined reference to `DeleteDC@4'|
c:\SDL-2.0.0-6799\src\video\windows\SDL_windowswindow.c|517|undefined reference to `DeleteDC@4'|
..\..\..\..\..\..\Program Files (x86)\CodeBlocks\MinGW\lib\libSDL2.a(SDL_windowswindow.o)||In function `WIN_GetWindowGammaRamp':|
c:\SDL-2.0.0-6799\src\video\windows\SDL_windowswindow.c|530|undefined reference to `CreateDCW@16'|
c:\SDL-2.0.0-6799\src\video\windows\SDL_windowswindow.c|532|undefined reference to `GetDeviceGammaRamp@8'|
c:\SDL-2.0.0-6799\src\video\windows\SDL_windowswindow.c|536|undefined reference to `DeleteDC@4'|
c:\SDL-2.0.0-6799\src\video\windows\SDL_windowswindow.c|536|undefined reference to `DeleteDC@4'|
..\..\..\..\..\..\Program Files (x86)\CodeBlocks\MinGW\lib\libSDL2.a(SDL_winmm.o)||In function `WINMM_CloseDevice':|
c:\SDL-2.0.0-6799\src\audio\winmm\SDL_winmm.c|166|undefined reference to `waveInClose@4'|
c:\SDL-2.0.0-6799\src\audio\winmm\SDL_winmm.c|171|undefined reference to `waveOutClose@4'|
c:\SDL-2.0.0-6799\src\audio\winmm\SDL_winmm.c|178|undefined reference to `waveOutUnprepareHeader@12'|
c:\SDL-2.0.0-6799\src\audio\winmm\SDL_winmm.c|178|undefined reference to `waveOutUnprepareHeader@12'|
..\..\..\..\..\..\Program Files (x86)\CodeBlocks\MinGW\lib\libSDL2.a(SDL_winmm.o)||In function `WINMM_PlayDevice':|
c:\SDL-2.0.0-6799\src\audio\winmm\SDL_winmm.c|129|undefined reference to `waveOutWrite@12'|
..\..\..\..\..\..\Program Files (x86)\CodeBlocks\MinGW\lib\libSDL2.a(SDL_winmm.o)||In function `DetectWaveOutDevs':|
c:\SDL-2.0.0-6799\src\audio\winmm\SDL_winmm.c|51|undefined reference to `waveOutGetNumDevs@0'|
c:\SDL-2.0.0-6799\src\audio\winmm\SDL_winmm.c|51|undefined reference to `waveOutGetDevCapsW@12'|
..\..\..\..\..\..\Program Files (x86)\CodeBlocks\MinGW\lib\libSDL2.a(SDL_winmm.o)||In function `DetectWaveInDevs':|
c:\SDL-2.0.0-6799\src\audio\winmm\SDL_winmm.c|52|undefined reference to `waveInGetNumDevs@0'|
c:\SDL-2.0.0-6799\src\audio\winmm\SDL_winmm.c|52|undefined reference to `waveInGetDevCapsW@12'|
..\..\..\..\..\..\Program Files (x86)\CodeBlocks\MinGW\lib\libSDL2.a(SDL_winmm.o)||In function `WINMM_OpenDevice':|
c:\SDL-2.0.0-6799\src\audio\winmm\SDL_winmm.c|209|undefined reference to `waveInGetNumDevs@0'|
c:\SDL-2.0.0-6799\src\audio\winmm\SDL_winmm.c|212|undefined reference to `waveInGetDevCapsW@12'|
c:\SDL-2.0.0-6799\src\audio\winmm\SDL_winmm.c|222|undefined reference to `waveOutGetNumDevs@0'|
c:\SDL-2.0.0-6799\src\audio\winmm\SDL_winmm.c|225|undefined reference to `waveOutGetDevCapsW@12'|
c:\SDL-2.0.0-6799\src\audio\winmm\SDL_winmm.c|301|undefined reference to `waveInOpen@24'|
c:\SDL-2.0.0-6799\src\audio\winmm\SDL_winmm.c|355|undefined reference to `waveOutPrepareHeader@12'|
c:\SDL-2.0.0-6799\src\audio\winmm\SDL_winmm.c|355|undefined reference to `waveOutPrepareHeader@12'|
c:\SDL-2.0.0-6799\src\audio\winmm\SDL_winmm.c|305|undefined reference to `waveOutOpen@24'|
..\..\..\..\..\..\Program Files (x86)\CodeBlocks\MinGW\lib\libSDL2.a(SDL_winmm.o)||In function `SetMMerror':|
c:\SDL-2.0.0-6799\src\audio\winmm\SDL_winmm.c|104|undefined reference to `waveOutGetErrorTextW@12'|
c:\SDL-2.0.0-6799\src\audio\winmm\SDL_winmm.c|104|undefined reference to `waveOutGetErrorTextW@12'|
..\..\..\..\..\..\Program Files (x86)\CodeBlocks\MinGW\lib\libSDL2.a(SDL_mmjoystick.o)||In function `SDL_SYS_JoystickInit':|
c:\SDL-2.0.0-6799\src\joystick\windows\SDL_mmjoystick.c|162|undefined reference to `joyGetNumDevs@0'|
c:\SDL-2.0.0-6799\src\joystick\windows\SDL_mmjoystick.c|167|undefined reference to `joyGetPosEx@8'|
c:\SDL-2.0.0-6799\src\joystick\windows\SDL_mmjoystick.c|169|undefined reference to `joyGetDevCapsW@12'|
..\..\..\..\..\..\Program Files (x86)\CodeBlocks\MinGW\lib\libSDL2.a(SDL_mmjoystick.o)||In function `SDL_SYS_JoystickUpdate':|
c:\SDL-2.0.0-6799\src\joystick\windows\SDL_mmjoystick.c|328|undefined reference to `joyGetPosEx@8'|
..\..\..\..\..\..\Program Files (x86)\CodeBlocks\MinGW\lib\libSDL2.a(SDL_windows.o)||In function `WIN_CoInitialize':|
c:\SDL-2.0.0-6799\src\core\windows\SDL_windows.c|47|undefined reference to `CoInitialize@4'|
..\..\..\..\..\..\Program Files (x86)\CodeBlocks\MinGW\lib\libSDL2.a(SDL_windows.o)||In function `WIN_CoUninitialize':|
c:\SDL-2.0.0-6799\src\core\windows\SDL_windows.c|61|undefined reference to `CoUninitialize@0'|
..\..\..\..\..\..\Program Files (x86)\CodeBlocks\MinGW\lib\libSDL2.a(SDL_windowsopengl.o)||In function `WIN_GL_ChoosePixelFormatARB':|
c:\SDL-2.0.0-6799\src\video\windows\SDL_windowsopengl.c|399|undefined reference to `ChoosePixelFormat@8'|
c:\SDL-2.0.0-6799\src\video\windows\SDL_windowsopengl.c|399|undefined reference to `SetPixelFormat@12'|
..\..\..\..\..\..\Program Files (x86)\CodeBlocks\MinGW\lib\libSDL2.a(SDL_windowsopengl.o)||In function `WIN_GL_SetupWindow':|
c:\SDL-2.0.0-6799\src\video\windows\SDL_windowsopengl.c|518|undefined reference to `SetPixelFormat@12'|
..\..\..\..\..\..\Program Files (x86)\CodeBlocks\MinGW\lib\libSDL2.a(SDL_windowsopengl.o)||In function `WIN_GL_ChoosePixelFormat':|
c:\SDL-2.0.0-6799\src\video\windows\SDL_windowsopengl.c|206|undefined reference to `DescribePixelFormat@16'|
c:\SDL-2.0.0-6799\src\video\windows\SDL_windowsopengl.c|210|undefined reference to `DescribePixelFormat@16'|
..\..\..\..\..\..\Program Files (x86)\CodeBlocks\MinGW\lib\libSDL2.a(SDL_windowsopengl.o)||In function `WIN_GL_SwapWindow':|
c:\SDL-2.0.0-6799\src\video\windows\SDL_windowsopengl.c|668|undefined reference to `SwapBuffers@4'|
..\..\..\..\..\..\Program Files (x86)\CodeBlocks\MinGW\lib\libSDL2.a(SDL_windowsmodes.o)||In function `WIN_GetDisplayMode':|
c:\SDL-2.0.0-6799\src\video\windows\SDL_windowsmodes.c|62|undefined reference to `CreateDCW@16'|
c:\SDL-2.0.0-6799\src\video\windows\SDL_windowsmodes.c|71|undefined reference to `CreateCompatibleBitmap@12'|
c:\SDL-2.0.0-6799\src\video\windows\SDL_windowsmodes.c|72|undefined reference to `GetDIBits@28'|
c:\SDL-2.0.0-6799\src\video\windows\SDL_windowsmodes.c|73|undefined reference to `GetDIBits@28'|
c:\SDL-2.0.0-6799\src\video\windows\SDL_windowsmodes.c|74|undefined reference to `DeleteObject@4'|
c:\SDL-2.0.0-6799\src\video\windows\SDL_windowsmodes.c|75|undefined reference to `DeleteDC@4'|
..\..\..\..\..\..\Program Files (x86)\CodeBlocks\MinGW\lib\libSDL2.a(SDL_windowsframebuffer.o)||In function `WIN_CreateWindowFramebuffer':|
c:\SDL-2.0.0-6799\src\video\windows\SDL_windowsframebuffer.c|36|undefined reference to `DeleteDC@4'|
c:\SDL-2.0.0-6799\src\video\windows\SDL_windowsframebuffer.c|39|undefined reference to `DeleteObject@4'|
||More errors follow but not being shown.|
||Edit the max errors limit in compiler options...|
||=== Build finished: 50 errors, 0 warnings (0 minutes, 4 seconds) ===|

 

 

I've asked on the SDL forums, I got nothing, and when I look it up all I see is people saying to link winmm which I shouldn't have to do, and it doesn't work anyway. I can't figure it out. Any help?



Sponsor:



Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS