Unable to compile SDL-1.2.8 for VisualC - Attn: Sam L

Ken Rogoway <Ken HomebrewSoftware.com> writes:

Inside the function “static int DX5_DInputInit(_THIS)” I am getting the
following compiler error under Windows with Visual C++ 6.0:

c:\code\sdl-1.2.8\src\video\windx5\sdl_dx5events.c(171) : warning
C4013: ‘GetAncestor’ undefined; assuming extern returning int
c:\code\sdl-1.2.8\src\video\windx5\sdl_dx5events.c(171) : error
C2065: ‘GA_ROOT’ : undeclared identifier
c:\code\sdl-1.2.8\src\video\windx5\sdl_dx5events.c(171) : warning
C4047: ‘=’ : ‘struct HWND__ *’ differs in levels of indirection from 'int ’

Any ideas?

It appears that the GetAncestor() function and GA_ROOT are defined in
WinUser.h. However, they are only defined if “#if(WINVER >= 0x0500)”

Since the default for Windows.h is to define WINVER to 0x0400 this means these
functions are not available. Can someone who has check-in authority (Sam?)
please #ifdef the changes to dx5events.c that Trevor Scroggins made to version
1.22 of that file.


  • Ken