Re: Running CircleMUD in windows

From: Henrik Stuart (hstuart@geocities.com)
Date: 01/08/02


Greetings,

On Tuesday, January 08, 2002 2:44:15 AM you wrote:
> Hmm.. I've been using visual C++ 6.0, well i got these errors:

> act.wizard.c
> C:\MUD\src\act.wizard.c(1408) : warning C4013: '_chdir' undefined; assuming
> extern returning int
> C:\MUD\src\act.wizard.c(1409) : warning C4013: 'execl' undefined; assuming
> extern returning int

   To start out with _chdir is declared in the header-file direct.h,
   so you would probably add a section like this somewhere in your
   sysdep.h file in your CircleMUD source:

   (Do note that Metroworks Codewarrior also uses the _MSC_VER define
   so you might want to use CIRCLE_WINDOWS if appropriate instead of
   _MSC_VER).

   execl, in vc++ is known as _execl and included from process.h so we
   add that as well.

   #ifdef _MSC_VER
   #include <direct.h>
   #include <process.h>
   #define execl _execl
   #endif

> comm.c
> c:\mud\src\comm.c(380) : warning C4013: 'close' undefined; assuming extern
> returning int

   I'll wager this refers to the closing of a file handle so that
   would be _close from io.h - hence add these lines above:

   #include <io.h>
   #define close _close

> db.c
> c:\mud\src\db.c(2396) : error C2106: '=' : left operand must be l-value

   What can I say... use an l-value when assigning? :o)

> objsave.c
> c:\mud\src\objsave.c(1282) : warning C4013: 'strcasecmp' undefined;
> assuming extern returning int

   Here it might do you some good to reflect on what strcasecmp
   actually does - in case you don't know a simple man instruction on
   linux/unix/cygwin/whatever will tell you it compares two
   0-terminated strings case-insensitively. So we move on, what is the
   function that does this in vc++? stricmp!

   #define strcasecmp stricmp

> oedit.c
> c:\mud\src\objsave.c(281) : warning C4700: local variable 'rent' used
> without having been initialized

   Make sure all those you read about are being initialised properly,
   for instance to 0. I haven't as much as looked at Del's package was
   it? So you have to figure that one out for yourself.

> zedit.c
> c:\mud\src\zedit.c(1052) : warning C4129: '%' : unrecognized character
> escape sequence

   Look and see whether you have a \% somewhere... might've meant \\%
   or something. Just look at the logic. :o)

> And I know you're going to say I'm not providing enough info, but this is
> just for people, if they will help I'll give them all the info they need,
> maybe you can help me because this is Del's bundle and he's not answering
> my ICQ messages..

   Well, since you are using Visual C++ and since it's quite expensive
   you might have considered actually looking at all that wonderful
   documentation it comes with. A simple search for either of the
   above mentioned functions turned up the information I just
   provided. Two things to always remember, reading the logic of the
   source code is your best bet and having good documentation is the
   key to your survival when you're stomped. (Whomever of you that
   insist that MSDN is a pile of..., just rest your case for now :P)

   Lastly, do take your time to figure out the differences from the
   debug allocation heap and the release allocation heap when working
   with vc++. If you understand it, it can be a great aid and help. If
   you don't it seems that vc++ is your enemy. :o)  (Oh, guess where
   you can read about it? Your documentation!)

   Hope that helped a tad.

--
Yours truly,
  Henrik Stuart (http://www.unprompted.com/hstuart/)

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   | Newbie List:  http://groups.yahoo.com/group/circle-newbies/   |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 06/25/03 PDT