gcc is the C compiler, g++ is the C++ compiler. In fact, it only matters when it comes to the final linking stage, where C++ code needs to use g++ - you can link C code with g++ too, but it may drag in a few extra bits that you didn't want/need. Otherwise, if you give gcc something that it thinks is C++, it will "do the right thing".
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
You do not have a path to g++ - does gcc work?
Edit: Just typing "gcc" should give you "no input files" or something like that.
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
Code:I wonder my gcc is also not working I just realised that when I entered following code #include <stdio.h> int main() { printf("hello"); } I am getting stdio is not found and a warning stating my pintf declaration is wrong That means I don't have C compiler installed is that is true? Now what I have to do Please advise Thanks
If gcc works in the sense that it's not saying "gcc not found", then you have gcc - not sure how you end up with gcc but no g++ - perhaps they are in separate packages [I usually install a bunch of compiler stuff when I install a new Linux, and I can't quite remember what goes in which package]. The lack of stdio.h indicates that some other essential component. Not sure what package that comes as either...
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.