I'm pretty sure that if you call your source file foo.cpp, then simply
calling gcc/cc will do the Right Thing. GCC's frontend figures out
what it's being fed, or is it .c++ (?), check man page.
The C and C++ compilers are integrated. Both process input
files through one or more of four stages: preprocessing,
compilation, assembly, and linking. Source filename suf-
fixes identify the source language, but which name you use
for the compiler governs default assumptions:
gcc assumes preprocessed (.i) files are C and assumes C
style linking.
g++ assumes preprocessed (.i) files are C++ and assumes C++
style linking.
Suffixes of source file names indicate the language and kind
of processing to be done:
.c C source; preprocess, compile, assemble
.C C++ source; preprocess, compile, assemble
.cc C++ source; preprocess, compile, assemble
.cxx C++ source; preprocess, compile, assemble
.m Objective-C source; preprocess, compile, assemble
[ 06-07-2001: Message edited by: howardm4 ]