header file duplicate definitions advice sought
uunet!bria!mike
uunet!bria!mike
Sat Mar 9 08:09:12 AEST 1991
In an article, pogo.ai.mit.edu!cracraft (Stuart Cracraft) writes:
>How can you eliminate redefined errors in C when you have several thousand
>"#define"'s defined in both *.h and *.c files(about 2000 files combined)?
I do it rather easily; with multiple headers, you simply do something
like this:
#ifndef _H_myhead
#define _H_myhead
.
. (defines and other Good Stuff go here)
.
#endif
You do this for each header file. Works like a charm for me.
--
Michael Stefanik, MGI Inc., Los Angeles| Opinions stated are not even my own.
Title of the week: Systems Engineer | UUCP: ...!uunet!bria!mike
-------------------------------------------------------------------------------
Remember folks: If you can't flame MS-DOS, then what _can_ you flame?
More information about the Comp.unix.wizards
mailing list