我的项目是 C 和 C++ 中的共享库(我在 Linux 平台上使用 Eclipse IDE)。项目采用 C 编译器 (GCC) 的默认设置。任何人都可以建议我如何为我的项目将编译器从 C 更改为 C++。
问问题
1429 次
2 回答
2
GCC 可以编译 C 和 C++ 源文件。它使用文件扩展名来确定它是否应该编译为 C 或 C++。
于 2013-09-30T07:47:11.390 回答
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 回答