- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What is difference between GCC and G++ Compilers?
45 Lectures 4.5 hours
66 Lectures 5.5 hours
We use gcc and g++ compilers in different times. Here we will see what are the differences between gcc and g++.
The gcc is GNU C compiler, and g++ is GNU C++ compiler. The main differences are like below −
- gcc can compile *.c or *.cpp files as C and C++ respectively
- g++ can also compile *.c and *.cpp files, but take both as C++ file
- If we want to use g++ to link the object files, it automatically links in the STD C++ libraries. The gcc does not do that
- gcc compiles C files which has fewer predefined macros
- gcc compiles C++ files with more number of predefined macros, and also g++ compiles with more predefined macros.
The extra macros for C++ files are like below −
#define __GXX_WEAK__ 1 #define __cplusplus 1 #define __DEPRECATED 1 #define __GNUG__ 4 #define __EXCEPTIONS 1 #define __private_extern__ extern
- What is the difference between g++ and gcc?
- What are the types of Compilers?
- What is difference between Sociopath and Psychopath?
- What is difference between UITableViewController and UIViewController?
- What is dispatcher and difference between dispatcher and scheduler?
- What is the difference between = and: = assignment operators?
- What is the difference between Hinduism and Buddhism?
- What is the difference between IAS and IPS?
- What is the difference between hastily and quickly?
- What is the difference between Osteoporosis and Osteoarthritis?
- What is the difference between deforestation and afforestation?
- What is the difference between home and house?
- What is the difference between CV and Resume?
- What is the difference between Liter and Litre?
- What is the difference between CDSL and NSDL?