logo       

Re: Question about compiling some C++ code.: msg#00225

gcc.help

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




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise