From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,a5df57f407c190a X-Google-Attributes: gidfee84,public From: lucia@savvy.zko.dec.com (Tim Lucia) Subject: Re: cxx compiler switch to comile .c files as .C files Date: 1995/07/26 Message-ID: <3v69mn$rj@nntpd.lkg.dec.com>#1/1 X-Deja-AN: 107033263 distribution: world references: organization: Digital Equipment Corporation reply-to: lucia@zko.dec.com newsgroups: comp.unix.osf.osf1 In article , 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.