Reputation: 69
My project is in C and shared library in C++ (I using Eclipse IDE on Linux platform). Default setting of project taking C compiler (GCC). Can anybody suggest me how to change compiler from C to C++ for my project.
Upvotes: 3
Views: 1574
Reputation: 87
GCC: GNU Compiler Collection
gcc: GNU C Compiler g++: GNU C++ Compiler
The main differences:
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).
Upvotes: 0
Reputation: 33273
GCC can compile both C and C++ source files. It uses filename extensions to determine if it should compile as C or C++.
Upvotes: 2