3

我的项目是 C 和 C++ 中的共享库(我在 Linux 平台上使用 Eclipse IDE)。项目采用 C 编译器 (GCC) 的默认设置。任何人都可以建议我如何为我的项目将编译器从 C 更改为 C++。

4

2 回答 2

0

GCC:GNU 编译器集合

gcc:GNU C 编译器 g++:GNU C++ 编译器

主要区别:

gcc will compile: .c/.cpp files as C and C++ respectively.

g++ will compile: .c/.cpp files but they will all be treated as C++ files.

Also if you use g++ to link the object files it automatically links in the std C++ libraries (gcc does not do this).
于 2013-09-30T08:33:34.107 回答