Re: DD's MazeCode compile problem

From: Walter Goodwin (
Date: 02/08/97

> gcc -c -g -O -Wall -fno-strict-prototypes  maze.c
> In file included from maze.c:15:
> structs.h:942: parse error before `socket_t'
> structs.h:942: warning: no semicolon at end of struct or union
> structs.h:943: warning: data definition has no type or storage class
> structs.h:976: parse error before `}'
> make[1]: *** [maze.o] Error 1
> make[1]: Leaving directory `/home/dark/circle30bpl11/src'
> make: *** [default] Error 2
> case:~/circle30bpl11/src>
> Not sure why structs.h is at fault after I drop in the maze code, because 
> I didn't even touch it.  I'm expecting the reason for this to be outside 
> the realm of my previous experience, so I guess I can learn from this if 
> someone can tell me what's going on.  Thanks in advance, and apologies 
> also in advance if this is a really stupid waste of bandwidth.

Here's another question for the FAQ if it isn't in there.
ie:  I'm getting compilation errors from a header file, and I
	didn't even change it?!?

Okay, if you raelly didn't change structs.h then the error isn't
in structs.h.  I think I've seen 2 cases where this has happened,
the first, is that the header file you #include'd right before the
header file messing has an error in it.  I can't really say much
beyond that, but look for a missing semicolon, are any other
errors you can find.

Also, I think that if you included files out of order, it can mess
things up.  ie.  2.h has stuff in it that is defined in 1.h, if you
include 2.h before 1.h, you can get errors,  your best bet here is to
mess with the order of the headers,  put conf.h & sysdep.h at the top,
then followed by structs.h, utils.h, etc.  Any file specific headers
should be the last one included just for coding style :)  (ie. maze.h
in this specific instance)   This is what I think is happening in
this case BTW :)

Jason Goodwin
| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   |

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