[CF-Devel] Compiling crossfire under win32

Mark Wedel mwedel at sonic.net
Sat Apr 20 23:51:59 CDT 2002


phil wrote:

>
     
      I'm compiling crossfire in Visual C++ right now.  I've encountered several problems.
     
     >
     
     
     >
     
      ----
     
     >
     
     
     >
     
      In config.h line 531-535:
     
     >
     
      /*
     
     >
     
      #ifndef WIN32	/* ***win32 disable watchdog as win32 default */
     
     >
     
      #define WATCHDOG
     
     >
     
      #endif
     
     >
     
      */
     
     >
     
     
     >
     
      Visual C++ doesn't like nested comments.  Not sure why this is commented out in the first place, doesn't make sense.  I removed the comments, and that fixed the problem.
     
     >
     
     
     

  I note that in CVS, it is not commented out.  Its unclear what the #ifndef 
WIN32 is really there for - if the watchdog doesn't work on windows, then as it 
is is OK (but the comment should be moved to the comment block above and 
actually say something to that effect).

  If instead it's just a preference setting (because the functionality may not 
have much use on windows systems), then the #ifndef stuff should probably be 
removed - as the user goes through this, they can then really decide if they 
want it or not.

  the watchdog stuff is really optional, and enabling it on most all machines it 
not likely to be much an issue, unless something is listening on port 13325 and 
doesn't like the udp packets it generates.


>
     
      ----
     
     >
     
     
     >
     
      In c_onject.c line 619-620:
     
     >
     
     
     >
     
      };
     
     >
     
      #endif
     
     >
     
      #endif
     
     >
     
     
     >
     
      should be
     
     >
     
     
     >
     
      #endif
     
     >
     
      };
     
     >
     
      #endif
     
     >
     
     
     >
     
      Otherwise, the brackets get messed up.  This isn't just a win32 problem.
     
     

  That code was really hokey - I've fixed it up - defining SAVE_INTERVAL without 
a value won't work, but since the sample in config.h has a value, I don't thin 
ktaht is a big issue - any more than many other defines in config.h probably 
won't work if just defined with no value.


>
     
     
     >
     
      ----
     
     >
     
     
     >
     
      I had to add image.c and weather.c to the project.
     
     

  If you can get a diff of that, I'll apply it to the server.


>
     
     
     >
     
      ----
     
     >
     
     
     >
     
      In weather.c, line 84 is:
     
     >
     
          long long int tmp;
     
     >
     
      I had to change it to:
     
     >
     
          long int tmp;
     
     >
     
      ----
     
     

  I think your code is probably more proper - I don't have a copy of the ANSI C 
spec, but I don't think long long is part of ANSI C - rather it is just a widely 
  used/supported extension.




    
    


More information about the crossfire mailing list