This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Question about compiling some C++ code.
- From: "Wayne" <dockeen at mchsi dot com>
- To: <gcc-help at gcc dot gnu dot org>
- Date: Sat, 24 May 2003 09:30:29 -0500
- Subject: Re: Question about compiling some C++ code.
Note it makes a difference what you name your file. If you
name your file something.c, then gcc is invoked, and the code
is compiled as if it were a C program, so standard C++
libraries are not linked automatically. If you name something
on the other hand something.cpp, g++ is used, and the code is
compiled as C++ code, linking libstdc++ and making C++ functions
available...
Wayne Keen