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

**URL:** <https://discourse.libsdl.org/t/unable-to-compile-sdl-1-2-8-for-visualc-attn-sam-l/12221>\
**Category:** SDL Development\
**Created:** [May 30, 2005, 9:31am UTC](https://discourse.libsdl.org/t/unable-to-compile-sdl-1-2-8-for-visualc-attn-sam-l/12221 "2005-05-30T09:31:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ken\_Rogoway](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/k/a5b964/32.png) [@Ken\_Rogoway](https://discourse.libsdl.org/u/Ken_Rogoway)\
**Post date:** [May 30, 2005, 9:31am UTC](https://discourse.libsdl.org/t/unable-to-compile-sdl-1-2-8-for-visualc-attn-sam-l/12221/1 "2005-05-30T09:31:36Z")

</div>

Ken Rogoway \<Ken [HomebrewSoftware.com](http://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:
> 
> SDL\_dx5events.c  
> 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.

Thanks,

- Ken
