[DGD] Nasty Problem - Please Help

Noah Gibbs angelbob at monkeyspeak.com
Mon Mar 11 05:05:00 CET 2002


  If this is the multiple-inclusion bug it looks like, you can fix it by
putting include guards around the file include/options.h -- put at the
front:

#ifndef __INCLUDE_OPTIONS_H__
#define __INCLUDE_OPTIONS_H__

and at the very end:

#endif /* __INCLUDE_OPTIONS_H__ */

This'll make sure that no matter how many times you #include the file,
it'll only define stuff once.  This same trick is very standard in C, it's
just that less #include statements tend to happen in DGD (probably for
reasons of compile time) so there's less discipline about doing this.

On Sun, 10 Mar 2002, Jesse Garrison wrote:

> When I tried to reboot the MUD, I got the following error:
> 
> /include/options.h, 41: macro CHANNELS redefined
> /include/options.h, 44: macro WIZ_CHANNELS redefined
> /include/options.h, 47: macro NUM_CHANNELS redefined
> Error within runtime error:
> Compilation within compilation
> Compilation within compilation
> Config error: initialization failed.

-- 
angelbob at monkeyspeak.com
See my page of DGD documentation at
"http://www.angelbob.com/projects/DGD_Page.html"
If you post to the DGD list, you may see yourself there!


_________________________________________________________________
List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list