This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Use command line defines vs defining in header files.


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>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]