From mboxrd@z Thu Jan 1 00:00:00 1970 From: rlau@csc.com To: gcc@gcc.gnu.org Subject: Use command line defines vs defining in header files. Date: Mon, 28 Aug 2000 13:11:00 -0000 Message-id: X-SW-Source: 2000-08/msg00614.html 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: test.h #ifdef COMPILER_OPT1 : #else : #endif #ifdef COMPILER_OPT2 : #else : #endif ------------------------------------------- So, if I would be defining COMPILER_OPT1 as compiler argument, I would do something like gcc -d COMPILER_OPT1 test.cpp. If I would defining COMPILER_OPT1 in header files, I would define it in test.h before #ifdef COMPILER_OPT1.