This is the mail archive of the egcs@egcs.cygnus.com mailing list for the EGCS project. See the EGCS home page for more information.


[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index] [Subject Index] [Author Index] [Thread Index]

Re: EGCS 1.1.1



On Sat, 20 Feb 1999, Royce McMinn wrote:

> [root@localhost /]# cd /proj/C++/Overloading
> [root@localhost Overloading]# egcc main.cpp
> /tmp/cczEPKrf.o: In function `main':
> /tmp/cczEPKrf.o(.text+0x7): undefined reference to `endl(ostream &)'
> /tmp/cczEPKrf.o(.text+0x15): undefined reference to `cout'
> /tmp/cczEPKrf.o(.text+0x1a): undefined reference to
> `ostream::operator<<(char const *)'
> /tmp/cczEPKrf.o(.text+0x25): undefined reference to
> `ostream::operator<<(int)'
> /tmp/cczEPKrf.o(.text+0x30): undefined reference to
> `ostream::operator<<(ostream &(*)(ostream &))'
> collect2: ld returned 1 exit status

Well, it looks like you're missing symbols for cout.

I tend to add a -lstdc++ to my link-line, and things are happy.

-Bob