Just like I've done for at least 3 other SDL versions, I get the SDL archive, unzip VisualC.zip for the .DSP file, and go to build it in VC6. Everything builds for the "
SDL"
project except for this isolated error...
SDL_dx5events.c
e:\\data\\webfoot\\repository\\thirdpartylibs\\sdl-1.2.8\\src\\video\\windx5\\sdl_dx5events.c(172) :
warning C4013: 'GetAncestor' undefined; assuming extern returning int
e:\\data\\webfoot\\repository\\thirdpartylibs\\sdl-1.2.8\\src\\video\\windx5\\sdl_dx5events.c(172) :
error C2065: 'GA_ROOT' : undeclared identifier
e:\\data\\webfoot\\repository\\thirdpartylibs\\sdl-1.2.8\\src\\video\\windx5\\sdl_dx5events.c(172) :
warning C4047: '=' : 'struct HWND__ *' differs in levels of indirection from 'int '
e:\\data\\webfoot\\repository\\thirdpartylibs\\sdl-1.2.8\\src\\video\\windx5\\sdl_dx5events.c(656) :
warning C4047: '=' : 'struct HWND__ *' differs in levels of indirection from 'int '
These warnings and error are all from the same statement: a call to a win32 API, GetAncestor(). So naturally I would guess that GetAncestor() and it's GA_ROOT param constant aren't declared, but if I look through what is included by SDL_dx5events.c, it goes...
#include "
directx.h"
->
#include "
windows.h"
->
#include "
winuser.h"
In winuser.h all the declarations I need for GetAncestor() are there. I even put an "
#error This is actually building"
directive in front of the declarations to make sure the preprocessor was bringing it in, and yeah, it is.
Also...
DOES NOT WORK: Put #include "
winuser.h"
in SDL_dx5events.c. Same compile error.
WORKS: Copy-and-paste GetAncestor() declarations from winuser.h directly into SDL_dx5events.c. Unfortunately, this isn't a good solution because it depends on this wonky compiler behavior I'm getting. I'm up-to-date on vc service packs, BTW.
So why can't I get this to compile? Any of you other DROD-building people run into this?
-Erik
____________________________
The Godkiller - Chapter 1 available now on Steam. It's a DROD-like puzzle adventure game.
dev journals |
twitch stream |
youtube archive (NSFW)