URGENT! gcc can't find ios stuff!!

URGENT! gcc can't find ios stuff!!

Post by PLANTE Er » Fri, 27 Oct 1995 04:00:00

I initially posted this in comp.os.linux.help, to no avail. (Actually I
indirectly got a suggestion to re-install Linux; I don't think it's THAT

I hope that this post is within the scope of this newsgroup, I think it
is since it's about a problem developing an app... Not a real world app,
but still...


PLEASE HELP A DESPERATE STUDENT who's got this big assignment to hand in

Everything was fine, I had compiled and executed programs that used the
ios classes (from <iostream.h> and <fstream.h>) and they had always
worked well.

And now that my assignement is due in TWO DAYS {note: actually, we got a
delay up to next week}, it stops working. It compiles (ie: produces .o
files), then at the linking stage it gives about a million lines like this

/tmp/cca011381.o(.text+0x77): undefined reference to
`istream::operator>>(char &)'

(Of course it gives this for every occurance of a reference to ios code).

Now, I don't need to know why (it could be a lot of reasons, I change
many things per day on my machine; guess I shouldn't do that :) ), I just
need to know HOW to get it working.

As an aside: I got a similar problem ONCE with CC on Irix 5.something at
school, and after a few seemingly unrelated bug fixes, it suddenly worked
and it now runs on Irix. The SAME sources still give those results on
linux though.

{Piece of text added here from a followup I added}

Additional info I've come up with: I've tried compiling the following
program called allo.cpp:
#include <iostream.h>

void main(void)
        cout << "Allo!!!"<<endl;


To compile, I did this, and that's what I got:
monLinux:~/ift2010/tp2$ gcc allo.cpp -o allo
/tmp/cca011951.o(.text+0x1a): undefined reference to `endl(ostream &)'
/tmp/cca011951.o(.text+0x24): undefined reference to `cout'
/tmp/cca011951.o(.text+0x29): undefined reference to
`ostream::operator<<(char const *)'
/tmp/cca011951.o(.text+0x34): undefined reference to
`ostream::operator<<(ostream &(*)(ostream &))'

(without worwrapping of course)
ARGGH! What is there wrong!!! A few hours ago (without even powering down
or doing anything wicked), this kind of code worked!! I _know_ it because
I have written tons of little "test" programs in the past few hours, most
of which using iostream, and they ran perfectly. What is happening?

Quite desperately,


1. 'gcc' can not find 'as'

        We installed gcc 2.95.3 from www.bull.de with all dependent packages,
        and we get :

        gcc -O2 -Wall -DUNIX -g -I../include -I../lang -c file_util.c -o\
        gcc: installation problem, cannot exec `as': No such file or directory

        There is no binary named 'as' in the whole filesystem.
        What to check, what extra packages to install ? Please suggest.
        Thanks in advance for your replies.

2. 8 bit Cross-assemblers

3. It's not bad canned meat...

4. Automatic date and time in Vi Editor

5. Kernel panic caused by swapper task

6. Solaris8 / gcc / where's the stuff in /usr/include

7. check this out!!!!!!

8. gcc: 'iostream: not found' ???

9. GCC can't find cpp -FAQ doesn't help

10. gcc 'cannot find cc1' and reports wrong version !!

11. Can't find the Texinfo stuff

12. 'Find' 'Updatedb' or find database replacement for Solaris 2.X?