This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: I need help with compiling/linking c++ programs under gcc 3.0.4[UW/EE Research Computing #51]
- From: Jeff Silverman <jeffs at rcs dot ee dot washington dot edu>
- To: Diego Novillo <dnovillo at redhat dot com>
- Cc: jeffs at kant dot ee dot washington dot edu, gcc at gcc dot gnu dot org, mgmeyer at kant dot ee dot washington dot edu, John Sahr <jdsahr at kant dot ee dot washington dot edu>, rrsl-help at kant dot ee dot washington dot edu
- Date: Thu, 07 Mar 2002 21:11:59 -0800
- Subject: Re: I need help with compiling/linking c++ programs under gcc 3.0.4[UW/EE Research Computing #51]
- References: <3C884435.37F3EDB8@rcs.ee.washington.edu> <1015564007.3078.16.camel@shadowfax>
- Reply-to: jeffs at rcs dot ee dot washington dot edu
Diego Novillo wrote:
> On Thu, 2002-03-07 at 23:55, Jeff Silverman wrote:
>
> > #include <fstream.h>
> > #include <iostream.h>
> >
> > int main()
> > {
> > cout<<"hello!"<<endl;
> > return 0;
> > }
> >
> > jeffs@kittitas /tmp/gcc-3.0.4 583 $ >>gcc ~jeffs/test.cc -o ~jeffs/test
> >
> Try compiling with 'g++' instead of 'gcc'.
>
> Diego.
This worked!!!!
I don't understand why. I was under the impression that the gcc would
handle either C++ or C code? Obviously, I'm wrong. But I don't get it.
And Diego, isn't after midnight in North Carolina? :-)
Many thanks,
Jeff
--
Jeff Silverman, sysadmin for the Research Computing Systems (RCS)
University of Washington, School of Engineering, Electrical Engineering Dept.
Box 352500, Seattle, WA, 98125-2500 FAX: (206) 221-5264 Phone (206) 221-5394
jeffs@rcs.ee.washington.edu http://rcs.ee.washington.edu/~jeffs