From: King Mundi (Kingmundi@AOL.COM)
Date: 11/27/97

from the www.circlemud.org site

got it to compile for windows95 using borland c++ 5.01 after modifying it fo
the following 4 error messages, comments about error messages follow at end
of message

Error:  INTERPRETER.H(20,39):Undefined structure 'command_info'
in interpreter.h
the following code

/* necessary for CMD_IS macro */
#ifndef __INTERPRETER_C__
extern struct command_info cmd_info[];

can be cut and pasted to move it below
the following code

struct command_info {
   char *command;
   byte minimum_position;
   void (*command_pointer)
   (struct char_data *ch, char * argument, int cmd, int subcmd);
   sh_int minimum_level;
   int  subcmd;

then save the file intrepreter.h

Error:  act.other.c(728,20):Undefined structure 'stat'
open conf.h and add
the following code


then save the file conf.h

Error:  spells.c(25,38):Undefined structure 'cha_app_type'
open spell.c and comment out
the following code

extern struct cha_app_type cha_app[];

then save the file spell.c

Error:  Error: Unresolved external '__chdir' referenced from module comm.c
open comm.c and comment out
the following code

  if (chdir(dir) < 0) {
    perror("SYSERR: Fatal error changing to data directory");

then save the file comm.c

for error 1
would you not have to first define struct command_info before you can declare
extern command_info cmd_info[]  ?  why would this code compile for everyone
else and only give borland's compiler trouble?

for error 2
does msvc++ somehow automatically include sys/stat.h ? i figure this is why
borland's compiler needs the addition of the #define

for error 3
i could not find where struct cha_app_type was declared, did i miss it ?

for error 4
could someone explain the concept of unresolved external variables ? i am
very amateur programmer, i assume that somehwere chdir is declared twice and
it can not determine which to use, or that it is not declared at all?

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |

This archive was generated by hypermail 2b30 : 12/08/00 PST