Are you #include'ing all the necessary < > header files before you're
#include'ing "merc.h" in religion.c?

-----Original Message-----
From: MarkD [mailto:[EMAIL PROTECTED]
Sent: Friday, March 08, 2002 2:40 PM
To: [email protected]
Subject: Problem compiling on RedHat 6.2


Hey list, i'm getting these VERY odd errors when i try to compile.
For some reason, cygwin will compile this fine, but when i upload
it to a redhat 6.2 box, i get this. (The actual code for some of
these lines is at the bottom of the file.) Does anyone have any
idea why this does this? I've tried everything i can think of.


gcc -c -Wall -O -g -DNO_CRYPT -DOLD_RAND religion.c
In file included from religion.c:3:
merc.h:645: parse error before `time_t'
merc.h:645: warning: no semicolon at end of struct or union
merc.h:1719: parse error before `time_t'
merc.h:1719: warning: no semicolon at end of struct or union
merc.h:1744: parse error before `time_t'
merc.h:1744: warning: no semicolon at end of struct or union
merc.h:1780: parse error before `logon'
merc.h:1780: warning: type defaults to `int' in declaration of `logon'
merc.h:1780: warning: data definition has no type or storage class
merc.h:1837: parse error before `}'
merc.h:1870: parse error before `time_t'
merc.h:1870: warning: no semicolon at end of struct or union
merc.h:1871: warning: type defaults to `int' in declaration of `last_idea'
merc.h:1871: warning: data definition has no type or storage class
merc.h:1872: parse error before `last_penalty'
merc.h:1872: warning: type defaults to `int' in declaration of `last_penalty
merc.h:1872: warning: data definition has no type or storage class
merc.h:1873: parse error before `last_news'
merc.h:1873: warning: type defaults to `int' in declaration of `last_news'
merc.h:1873: warning: data definition has no type or storage class
merc.h:1874: parse error before `last_changes'
merc.h:1874: warning: type defaults to `int' in declaration of `last_changes
merc.h:1874: warning: data definition has no type or storage class
merc.h:1875: parse error before `last_update'
merc.h:1875: warning: type defaults to `int' in declaration of `last_update'
merc.h:1875: warning: data definition has no type or storage class
merc.h:1876: parse error before `last_rp'
merc.h:1876: warning: type defaults to `int' in declaration of `last_rp'
merc.h:1876: warning: data definition has no type or storage class
merc.h:1904: parse error before `}'
merc.h:2512: parse error before `current_time'
merc.h:2512: warning: type defaults to `int' in declaration of `current_time
merc.h:2512: warning: data definition has no type or storage class
merc.h:2720: `wiznet' redeclared as different kind of symbol
merc.h:1795: previous declaration of `wiznet'
merc.h:2750: `act' redeclared as different kind of symbol
merc.h:1793: previous declaration of `act'
merc.h:2846: `damage' redeclared as different kind of symbol
merc.h:1827: previous declaration of `damage'
religion.c: In function `do_supplicate':
religion.c:55: dereferencing pointer to incomplete type
religion.c:61: dereferencing pointer to incomplete type
religion.c:63: dereferencing pointer to incomplete type
religion.c:106: dereferencing pointer to incomplete type
religion.c:108: dereferencing pointer to incomplete type
religion.c:108: dereferencing pointer to incomplete type
religion.c:109: dereferencing pointer to incomplete type
religion.c:114: dereferencing pointer to incomplete type
--------------------------
These errors go on and on to the end of the file. They occur every time
'ch' is called in do_supplicate.
--------------------------
make: *** [religion.o] Error 1


----------
Code lines
----------
merc.h:

<snip>
struct  note_data
{
    NOTE_DATA * next;
    bool        valid;
    sh_int      type;
    char *      sender;
    char *      date;
    char *      to_list;
    char *      subject;
    char *      text;
    time_t      date_stamp;  <------- line 645
};

/*
 * An affect.
 */
struct  affect_data
{
    AFFECT_DATA *       next;
    bool                valid;
    sh_int              where;
<snip>

religion.c:

<snip>
void do_supplicate(CHAR_DATA * ch, char * argument)
{
        char arg1[MIL];
        
        if (IS_NPC(ch)) <------------------------- line 55
        {
                stc("I don't think so.\n\r",ch);
                return;
        }

        if (ch->favor<500)   <----------- line 61
        {
                ptc(ch,"%s ignores you.\n\r",religion_table[ch->god].name);
                return;
        }

        argument = one_argument(argument, arg1);

        if (arg1[0] == '\0') 
        {
                stc("Supplicate for what?\n\r", ch);
                return;
        }

<snip>

Any help would be awesome, Thanks a lot

-Faramir

_____________________________________________
Free email with personality! Over 200 domains!
http://www.MyOwnEmail.com


-- 
ROM mailing list
[email protected]
http://www.rom.org/cgi-bin/mailman/listinfo/rom

Reply via email to