Complete.Org: Mailing Lists: Archives: freeciv-dev: June 2002:
[Freeciv-Dev] Re: compile on windows and possible bug with map size
Home

[Freeciv-Dev] Re: compile on windows and possible bug with map size

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: compile on windows and possible bug with map size
From: swamp-dog@xxxxxxxxxxxx (Guy Harrison)
Date: Tue, 25 Jun 2002 02:12:32 GMT

On Mon, 24 Jun 2002 10:57:39 +1000, Christian Stock
<cstock@xxxxxxxxxxxxxx> wrote:

>Hi,
>
>I'm trying to compile the cvs freeciv version for win (from yesterday) on 
>my home box (which doesn't have linux anymore, because I ran out of 
>diskspace and was using linux for work only).
>
>The reason why I want to compile it is because the win cvs (and the 1.12.0 
>version) crashes on a custom made map. I basically doubled the large earth 
>map (so it's 320x180 now). I need that sort of detail and size for a 
>scenario I'm making. It seems to be too big, although in the code it looks 
>like maps can be as big as they want to be, so I suspect a bug in the win 
>client. So I wanted to fix it :)
>
>I'm using MSVC 6.0, and I got really close compiling the server yesterday. 
>First off, since I'm using MSVC, I was stuck with the autogen.sh. Although 
>I have lot's of programming experience, I'm not very good when it come to 
>setting things up. I know that I need a config.h and I have worked out a 
>few things on what I need to define and what not, but I have a few 
>problems. Can someone maybe post a working config.h for a win system? And 
>where do I include it, ie where do I define HAVE_CONFIG_H?

Not sure. Rarely use VC. You effectively want "-DHAVE_CONFIG_H" added
into its equivilent of "CFLAGS" so somewhere in Project->Settings->C/C++
I expect. Either or both of [Preprocessor Options]/[Project Options]?

>I defined the 
>win variables in the individual header files which is of course not ideal 
>at all, but it worked to get most stuff compiled for now...
>
>my linking still has 2 problems. When I define NATIVE_WIN (which assume I 
>should), the code uses _beginthreadex, which is undefined.

WIN32_NATIVE?

>If I include the 
>libraries libcmt.lib or msvcrt.lib, I get conflicts, so what do i do?

It's not still sat in C++ mode somehow is it? Long shot that.

>also, S_ISREG is undefined. It doesn't seem to be windows related, so how 
>do i fix that?

Ought to be in <sys/stat.h> but those macros are "accidentally" omitted
from VC even though the flags with which to implement them are there
*but* iirc (and I may not) those flags are posix ones and won't work
properly for all win32 variants.

You should be okay with S_ISREG though: copy the ming32 <sys/stat.h>...

#define _S_IFREG        0x8000  /* Regular */
#define _S_IFMT         0xF000  /* File type mask */
#define _S_ISREG(m)     (((m) & _S_IFMT) == _S_IFREG)

...but do test it!


-- 
swamp-dog@xxxxxxxxxxxx


[Prev in Thread] Current Thread [Next in Thread]