Is there any difference between g++
and gcc -lstdc++
?
That is, is g++
just gcc
with the C++ standard library linked by default?
Is there any difference between g++
and gcc -lstdc++
?
That is, is g++
just gcc
with the C++ standard library linked by default?
g++ is a compiler, like gcc. g++ however includes the ability to parse modern C++ constructs, whereas gcc can do some of these, but is not intended for it.
-lstdc++ and gcc allows the compilation of libraries that use c++ specific runtime interfaces with your C code (gcc).
An example of this is a C application that needs to use a C++ library without needing to completely remake the C application into a C++ one to interface with it.