PDA

View Full Version : C++ Compiler



maclu
01-08-2002, 11:14 AM
I use Linux 7.1 , and i can compile C and Java , but now i tried to compile C++ and i got error massages.
the program was
#include<iostream.h> // or <iostream>
void main(void)
{cout << "hello\n";}
i compiled with
cc -o runningname file.cpp

I think the error comes with the <iostream>,in the /usr/include directory i see all C header files but no iostream , but in YaST the GNU C++ Compiler is installed.

Salem
01-08-2002, 01:49 PM
You ran the C compiler
Try
g++ -o runningname file.cpp

maclu
01-09-2002, 09:35 AM
Thanks , now its running !

nvoigt
01-09-2002, 12:51 PM
It's been some time, and it might vary from *nix to *nix, but when I last used one, the C compiler was cc while the C++ compiler was CC.

gnu-ehacks
01-09-2002, 07:44 PM
I think it depends on the distro...I think there was a gpp, g++, and gcc...I only saw gpp on 1 distro of Linux though.