Newbie question.

M

Mike Farmer

Newbie to Linux that is. Please have mercy on a person about to move from
Windows VC++/Borland CBuilder to Linux and hold the flames.

What is the difference between g++ and gcc ??

My new books are split between the two. For a while I thought there was
no difference since "man g++" and "man gcc" seem to bring up the same page.

But, just playing around with a very (VERY) simple main.cpp like this...

#include <iostream>
using namespace std;

int main()
{
cout << "Test\n";
return 0;
}

shows that g++ compiles it just fine and gcc chokes on it.

So, they are different - I now know that much. But is one newer than the
other, or are they from parallel GNU developers. Or what?

Thanks
MF
 
I

Ioannis Vranos

Mike Farmer said:
Newbie to Linux that is. Please have mercy on a person about to move from
Windows VC++/Borland CBuilder to Linux and hold the flames.

What is the difference between g++ and gcc ??

My new books are split between the two. For a while I thought there was
no difference since "man g++" and "man gcc" seem to bring up the same page.

But, just playing around with a very (VERY) simple main.cpp like this...

#include <iostream>
using namespace std;

int main()
{
cout << "Test\n";
return 0;
}

shows that g++ compiles it just fine and gcc chokes on it.

So, they are different - I now know that much. But is one newer than the
other, or are they from parallel GNU developers. Or what?


gcc is the C compiler, g++ is the C++ compiler and the whole compiler
colletion is called GCC. I think it is about time GCC::gcc to be renamed to
GCC::gc.






Ioannis Vranos
 
M

Mike Farmer

gcc is the C compiler, g++ is the C++ compiler and the whole compiler
colletion is called GCC. I think it is about time GCC::gcc to be renamed to
GCC::gc.

It has been so long since I have seen an old C compiler it didn't
even cross my mind that one was still hanging around on Linux.

No wonder GCC choked:)

Thanks for the info - back to the books.

MF
 
V

Victor Bazarov

Ioannis Vranos said:
[..] I think it is about time GCC::gcc to be renamed to
GCC::gc.

Huh? Why? The second 'c' stands for 'compiler'. I'd
rather see g++ renamed to gcppc.
 
I

Ioannis Vranos

Victor Bazarov said:
Ioannis Vranos said:
[..] I think it is about time GCC::gcc to be renamed to
GCC::gc.

Huh? Why? The second 'c' stands for 'compiler'. I'd
rather see g++ renamed to gcppc.



Ehehe. GCC means GNU Compiler Collection. gcc on the other hand means gnu c
compiler. So GCC includes gcc, g++, and some of other languages like pascal,
objective-c, etc.






Ioannis Vranos
 
C

Christopher Benson-Manica

Mike Farmer said:
It has been so long since I have seen an old C compiler it didn't
even cross my mind that one was still hanging around on Linux.

<ot>Are you kidding? gcc is the heart of Linux - it compiles many,
many Linux applications :)</ot>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,167
Messages
2,570,910
Members
47,453
Latest member
MadelinePh

Latest Threads

Top