Announcement: Be excellent to each other.


Caravel Forum : Caravel Boards : Development : SDL 1.2.8 build problem. (Driving me @*&! nuts.)
New Topic New Poll Post Reply
Poster Message
ErikH2000
Level: Legendary Smitemaster
Avatar
Rank Points: 2794
Registered: 02-04-2003
IP: Logged
icon SDL 1.2.8 build problem. (+1)  
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)
01-20-2005 at 08:40 PM
View Profile Send Email to User Show all user's posts This architect's holds Quote Reply
ErikH2000
Level: Legendary Smitemaster
Avatar
Rank Points: 2794
Registered: 02-04-2003
IP: Logged
icon Re: SDL 1.2.8 build problem. (0)  
Tim wrote:
Try this link?

http://article.gmane.org/gmane.comp.lib.sdl/19686/match=getancestor
Tim, thanks for the link. It is amusing to me that the crummy solution that person came up with is exactly what I did. I even has the #ifndef GA_ROOT. Bleh. I do not understand why it shouldn't compile. Double bleh.

-Erik

____________________________
The Godkiller - Chapter 1 available now on Steam. It's a DROD-like puzzle adventure game.
dev journals | twitch stream | youtube archive (NSFW)
01-20-2005 at 10:31 PM
View Profile Send Email to User Show all user's posts This architect's holds Quote Reply
trick
Level: Legendary Smitemaster
Rank Points: 2580
Registered: 04-12-2003
IP: Logged
icon Re: SDL 1.2.8 build problem. (0)  
Erik, are you building this for use with JtRH ? SDL 1.2.8 won't work with JtRH unpatched, because of too strict constraints on surface size. If you want to use SDL 1.2.8 with JtRH, you'll have to change line 58 of src/video/SDL_surface.c from:
if ( width > 16384 || height > 16384 ) {
to:
if ( width >= 16384 || height >= 65536 ) {
This has been fixed in SDL CVS, so 1.2.9 will work unpatched.

- Gerry
01-20-2005 at 11:35 PM
View Profile Send Private Message to User Send Email to User Show all user's posts Quote Reply
ErikH2000
Level: Legendary Smitemaster
Avatar
Rank Points: 2794
Registered: 02-04-2003
IP: Logged
icon Re: SDL 1.2.8 build problem. (0)  
trick wrote:
Erik, are you building this for use with JtRH ?
Naw, it's for something else. Can't talk about it due to NDA stuff.

-Erik

____________________________
The Godkiller - Chapter 1 available now on Steam. It's a DROD-like puzzle adventure game.
dev journals | twitch stream | youtube archive (NSFW)
01-20-2005 at 11:43 PM
View Profile Send Email to User Show all user's posts This architect's holds Quote Reply
New Topic New Poll Post Reply
Caravel Forum : Caravel Boards : Development : SDL 1.2.8 build problem. (Driving me @*&! nuts.)
Surf To:


Forum Rules:
Can I post a new topic? No
Can I reply? No
Can I read? Yes
HTML Enabled? No
UBBC Enabled? Yes
Words Filter Enable? No

Contact Us | CaravelGames.com

Powered by: tForum tForumHacks Edition b0.98.8
Originally created by Toan Huynh (Copyright © 2000)
Enhanced by the tForumHacks team and the Caravel team.