user2830260
user2830260

Reputation: 69

How to change compiler from C to C++ in Eclipse IDE?

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

Answers (2)

Anirudh Garg
Anirudh Garg

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

Related Questions