I Believe that this is simalar to what I have been wondering.
what includes would I need for cout and cin?
there are commands that are included in the tutorial thjt I am looking
through
It dosen't look like iostream.h is cutting it
> -----Original Message-----
> From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, March 01, 2000 4:40 PM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: Re: gcc and compiling errors.
>
>
>
> On Wed, 1 Mar 2000, John Starkey wrote:
>
> > I'm not sure if I am out of the scope of this list yet, but since I'm
> > still new to Linux and gcc I thought I'd ask you guys.
> >
> > RedHat6.1 is the system.
> >
> > I'm trying to compile a small assignment for school using gcc. It won't
> > compile so I stripped it down to "Hello World". I thought I'd compiled
> > on this machine before but maybe not. Anyway.
> >
> > These are the errors:
> >
> >
> > /tmp/cc2fWQbM.o: In function 'main':
> > /tmp/cc2fWQbM.o(.text+0x4): undefined reference to 'endl(ostream &)'
> > /tmp/cc2fWQbM.o(.text+0xe): undefined reference to 'cout'
> > /tmp/cc2fWQbM.o(.text+0x13): undefined reference to
> > 'ostream::operator<<(char const *)'
> > /tmp/cc2fWQbM.o(.text+0x1e): undefined reference to
> > 'ostream::operator<<(ostream &(*)(ostream &))'
> > collect2: ld returned 1 exit status
>
> EXCUSE ME? That **** doesn't look like c to me. c++ maybe, that has a
> cloven hoof and I don't touch it. Not even well done. try naming it as
> a c++ file, suffix can be .C or .cc or .cxx(?), or if you want to call
> it .c, compile it with g++.
> >
> > I also tried compiling something I've done before (on another machine)
> > and it returned basically the same errors. So I am thinking it has to
> do
> > with the install. So I tried installing glibc, glibc-devel, and
> > glibc-profile. I think someone told me these are the C libraries. I
> also
> > did a 'find iostream' and nothing came up. Math and iostream are the
> > only includes I need in this one. I did find Math.h in
> > /usr/i386-glibc20-linux/include
> >
> > Am I looking in the right direction???
>
> Probably not.
>
> Script started on Wed Mar 1 16:32:30 2000
> find -name iostream.h
> ./g++-2/iostream.h
> ./g++-3/iostream.h
> witsend:/usr/include$ exit
> exit
>
> Script done on Wed Mar 1 16:33:33 2000
>
> libraries you will need might be libg++ and libstdc++, I think.
>
> why cout? what is wrong with printf("Hello world\n");
> >
> > Thanks guys.
> >
> > John
> >
> Lawson
>
>
>
>
>
> ________________________________________________________________
> YOU'RE PAYING TOO MUCH FOR THE INTERNET!
> Juno now offers FREE Internet Access!
> Try it today - there's no risk! For your FREE software, visit:
> http://dl.www.juno.com/get/tagj.
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
> the body of a message to [EMAIL PROTECTED]
> Please read the FAQ at http://www.linux-learn.org/faqs
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.linux-learn.org/faqs