This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
RE: About Linking of a simple C++ prog.
- To: "'brook_wc'" <brook_wc at sina dot com>
- Subject: RE: About Linking of a simple C++ prog.
- From: "Rupert Wood" <me at rupey dot net>
- Date: Thu, 11 Oct 2001 09:53:51 +0100
- Cc: <gcc-help at gcc dot gnu dot org>
brook_wc wrote:
> I just installed gcc2.95 on Solaris 8 sparc.
> I also installed the binutils too.
> But when compiling the Hello program, I met the error
> message as followes:
> $PWD$gcc test.cpp
You need to compile and link using the C++ compiler driver, g++:
fox:~$ cat test.cpp
#include <iostream.h>
main()
{
cout<<"hello"<<endl;
}
fox:~$ g++ test.cpp
fox:~$ ./a.out
hello
fox:~$ uname -a
SunOS fox 5.8 Generic_108528-06 sun4u sparc SUNW,Sun-Blade-100
Rup.