This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: gcc and g++
Paolo, thank you for your answer and sorry for misplacing the question
:blush:.
I thought that the fact of using cpp (or cc) extensions would call the "c++
compiler"
thankx,
S.
Paolo Carlini-3 wrote:
>
> swarmanizer wrote:
>> hello,
>>
>> why does
>>
>> g++ file.cpp -o file #compile ok
>> gcc file.cpp -o file # doesn't compile ok - log at the end...
>>
> In a nutshell, because the 'gcc' driver, being the C driver, not the C++
> driver, doesn't link the C++ runtime at the end. If you want, you can
> explicitly add -lstdc++ to the command line, or, definitely the first
> choice in general, just use 'g++'.
>
> Note that your kind of curiosity has nothing to do with the development
> of the GNU C++ runtime library itself, is suited for the gcc-help
> mailing list instead.
>
> Paolo.
>
>
--
View this message in context: http://www.nabble.com/gcc-and-g%2B%2B-tp25803309p25812544.html
Sent from the gcc - libstdc++ mailing list archive at Nabble.com.