Re: g++ -D compiler options
- From: Roger Leigh <rleigh@xxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 27 Mar 2008 23:24:40 +0000
Daniel Franklin <daniel@xxxxxxxxxxxxxxxxxxxxx> writes:
Mark Hobley wrote:
What are the effects of the -D options?
-Ddebian
[...]
These effectivly insert #defines in the preprocessor stage. Hence if you
compile with -Ddebian, and in your code you have
#ifdef debian
some code
#else
some other code
#endif
The -Ddebian is equivalent to inserting a line which says
#define debian
at the top of the C file you're currently compiling.
Possibly worth mentioning for the OP that anyone who actually used
-Ddebian
or
#ifdef debian
in their code deserves a slap. Anything that builds on Debian should
be portable to any other GNU or POSIX platform, and so Debian-specific
code is never a good idea.
Regards,
Roger
--
.''`. Roger Leigh
: :' : Debian GNU/Linux http://people.debian.org/~rleigh/
`. `' Printing on GNU/Linux? http://gutenprint.sourceforge.net/
`- GPG Public Key: 0x25BFB848 Please GPG sign your mail.
Attachment:
pgpnu2wOQCEWu.pgp
Description: PGP signature
- References:
- g++ -D compiler options
- From: Mark Hobley
- Re: g++ -D compiler options
- From: Daniel Franklin
- g++ -D compiler options
- Prev by Date: Re: TUTORIALS ON COMPUTER PROGRAMMING
- Next by Date: Re: Trouble with getbyhostname()
- Previous by thread: Re: g++ -D compiler options
- Next by thread: autoreconf: g++ compiler options in configure.ac
- Index(es):
Relevant Pages
|