This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Use command line defines vs defining in header files.
- To: rlau at csc dot com
- Subject: Re: Use command line defines vs defining in header files.
- From: Jan Dvorak <johnydog at go dot cz>
- Date: Mon, 28 Aug 2000 22:23:09 +0200
- Cc: gcc at gcc dot gnu dot org
- Organization: (XNET.cz)
- References: <OF52EA69A9.972B648C-ON86256949.006E72AC@com>
On Mon, Aug 28, 2000 at 03:11:32PM -0500, rlau@csc.com wrote:
>
> Can anyone give me a strong argument as whether defining constants for
> conditional compiling as compiler argument vs.
> defining thems in header files?
>
> for examples:
>
Not all compilers supports -D, and you can get to line length limit on some systems (255 on dos ?). -D is useful when you have to specifi one or more really dependent argumenst (such as -DHAVE_CONFIG_H in autoconf does), and
you get better readibility of code to search for #define than search through all the (generated) Makefile.
Jan Dvorak <johnydog@go.cz>