参考What is the difference between g++ and gcc? 1.The actual compiler is "cc1" for C and "cc1plus" for C++; both gcc and g++ are drivers (which call the preprocessor/compiler/assembler/linker as needed). 2.For c++ you should use g++. It'…
gcc和g++的区别总结:gcc: GNU C Compilerg++: GNU C++ Compiler 共同点:均属于the GNU Compiler Collection,gcc是鼻祖,后来才有了g++ g++ == gcc -xc++ -lstdc++ -shared-libgcc (gcc后面两项都是链接选项,表示g++要相比gcc链接其他库函数) ##差异点:1.g++会自动链接C++标准库,比如algorith,string,vector等.2.gcc会根据文件后缀(.c,.cpp…