Cross compiling SDL 1.2.15 for ARM Win32

I was getting this fun error:

C:\proj\ss\SDL-1.2.15\VisualC\SDL>link /dll -out:sdl.dll *.obj winmm.lib dxguid.lib gdi32.lib user32.lib advapi32.lib dxguid.lib uuid.lib dxguid.lib Version.res
Microsoft (R) Incremental Linker Version 14.24.28315.0
Copyright (C) Microsoft Corporation. All rights reserved.

Creating library sdl.lib and object sdl.exp
SDL_dx5events.obj : error LNK2001: unresolved external symbol GUID_SysMouse
SDL_dx5events.obj : error LNK2001: unresolved external symbol GUID_SysKeyboard
SDL_dx5events.obj : error LNK2019: unresolved external symbol IID_IDirectInputDevice2A referenced in function DX5_DInputInit
SDL_dx5video.obj : error LNK2001: unresolved external symbol GUID_XAxis
SDL_dx5video.obj : error LNK2001: unresolved external symbol GUID_YAxis
SDL_dx5video.obj : error LNK2001: unresolved external symbol GUID_ZAxis
SDL_dx5video.obj : error LNK2001: unresolved external symbol GUID_RxAxis
SDL_dx5video.obj : error LNK2001: unresolved external symbol GUID_RyAxis
SDL_dx5video.obj : error LNK2001: unresolved external symbol GUID_RzAxis
SDL_dx5video.obj : error LNK2001: unresolved external symbol GUID_Slider
SDL_dx5video.obj : error LNK2001: unresolved external symbol GUID_Key
SDL_dx5video.obj : error LNK2001: unresolved external symbol GUID_POV
sdl.dll : fatal error LNK1120: 12 unresolved externals

Which was NOT easy to track down. Thankfully while amputating and chasing the origin of GUID_Key, I ran across this: cboard.cprogramming.com

I have read various texts that state you must
Code:?

1#define INITGUID

And yes, you do!

In the file SDL-1.2.15\src\video\windx5\directx.h I just added it to the top, and now it’ll build the hacky DLL!

Maybe it’s something for Visual C++ version 19? I don’t know.

Anyway the advantage is now I have full audio for DosBOX!

Luckily updating binaries wasn’t too hard.

Leave a Reply