From: lucia@savvy.zko.dec.com (Tim Lucia)
Subject: Re: cxx compiler switch to comile .c files as .C files
Date: 1995/07/26 [thread overview]
Message-ID: <3v69mn$rj@nntpd.lkg.dec.com> (raw)
In-Reply-To: swaltersDCA5t7.Gzw@netcom.com
In article <swaltersDCA5t7.Gzw@netcom.com>, swalters@netcom.com (Southwest Airlines) writes:
|>Is there a compiler switch on the cxx compiler to force it to use the c++
|>compiler on a file with a .c extension? It keeps invoking the c89 compiler.
|>
|>Thanks
|>
|>Scott Walters
|>Southwest Airlines
|>swalters@netcom.com
|>
|>
From cxx(1) [that's a manual page]
-x cxx Cause all subsequent file names to be compiled as C++ source
files, regardless of their suffixes. This option applies to
all following file names up to the next -x option, except
for files with the .a or .o suffix.
-x none Cause all subsequent file names to be treated according to
their file name suffixes. This option is the reverse of the
-x cxx option. It applies to all following file names until
the next -x option.
In the following example, files one.cxx and two.c will be
compiled as C++ source files, and file three.c will compiled
as a C source file:
cxx one.cxx -x cxx two.c -x none three.c
The -x none option is the default.
--
Timothy J. Lucia - DECladebug Email: mailto:lucia@zko.dec.com
Digital Equipment Corporation Phone: 603.881.2615
110 Spitbrook Road ZKO2-3/K06 Fax: 603.881.0120
Nashua, NH USA 03062-2698 I'd rather be bicycling.
next prev parent reply other threads:[~1995-07-26 4:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1995-07-25 4:00 cxx compiler switch to comile .c files as .C files Southwest Airlines
1995-07-26 4:00 ` Jussi Kukkonen
1995-07-26 4:00 ` Tim Lucia [this message]
1995-07-26 4:00 ` Dan Pop
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox