Mail Archives: djgpp/1993/08/24/12:13:48
You can also use "gcc -xc++ <filename>" on a filename with any
extension to force a c++ compilation. There are other language options to
the -x switch; look in the docs.
(BTW, the extension is case specific but needn't be strictly
lowercase; in particular, a ".C" extension on a filename passed to gcc on
the command line specifies a c++ file. This is a handy trick to get gcc to
compile in c++ mode while still having file extensions that other compilers
recognize.)
--Greg Galperin
- Raw text -