delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/09/08/10:56:40

From: Tuomo A Turunen <tuturune AT cc DOT helsinki DOT fi>
Newsgroups: comp.os.msdos.djgpp
Subject: Constant definitions to compiler
Date: 8 Sep 1999 13:19:44 GMT
Organization: University of Helsinki
Lines: 13
Message-ID: <7r5npg$c9a$1@oravannahka.helsinki.fi>
NNTP-Posting-Host: sirppi.helsinki.fi
X-Trace: oravannahka.helsinki.fi 936796784 12586 128.214.205.27 (8 Sep 1999 13:19:44 GMT)
X-Complaints-To: usenet AT news DOT helsinki DOT fi
NNTP-Posting-Date: 8 Sep 1999 13:19:44 GMT
X-Newsreader: TIN [UNIX 1.3 unoff BETA 970613; alpha OSF1 V4.0]
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

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?

-- 
Tuomo Turunen
tuomo DOT a DOT turunen AT helsinki DOT fi
http://www.cs.Helsinki.FI/~tuturune

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019