Date: Wed, 8 Sep 1999 11:05:10 -0400 Message-Id: <199909081505.LAA20693@envy.delorie.com> From: DJ Delorie To: djgpp AT delorie DOT com In-reply-to: <7r5npg$c9a$1@oravannahka.helsinki.fi> (message from Tuomo A Turunen on 8 Sep 1999 13:19:44 GMT) Subject: Re: Constant definitions to compiler References: <7r5npg$c9a$1 AT oravannahka DOT helsinki DOT fi> Reply-To: djgpp AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > Is it possible to give constant definitions to compiler as command line > arguments? Something like this: > > gcc (define OWN_CONSTANT "testing") test.c -o test.exe > > and the OWN_CONSTANT would be replaced with "testing" string in test.c > source code file. How is this possible? Try this: gcc -DOWN_CONSTANT='"testing"' test.c -o test.exe