can't find cerr ?

sun zongjun szj@ccoss.com.cn
Thu Jul 4 18:50:00 GMT 2002


Hi:
    I have used the redhat 7.3 for intel 386 on my PIII. Its gcc is 
2.96.I compile a gui library
xclass with it. Nothing wrong happens. But when I compile the 
application based on the
xclass library. the compiler reports the following complaints.

g++ -o notepad main.o OXDialogs.o  -L/usr/X11R6/lib -L/opt/install/lib 
-lX11 -lXext -lXpm -lxclass
/opt/install/lib/libxclass.so: undefined reference to `cerr'
/opt/install/lib/libxclass.so: undefined reference to `endl(ostream &)'
/opt/install/lib/libxclass.so: undefined reference to 
`ostream::operator<<(char const *)'
collect2: ld returned 1 exit status

    I have used the gcc ,c++,g++. They have the same results. Yestoday I 
compile them using
the gcc 3.1 from FSF. the same problem is.
   I guess .the endl ostream is a part of c++ library. but where is it 
now. g++ can't find them?
Or my system is messed ??
   Thanks for everyone helping me. for your hardworkings
   Sun Zongjun




More information about the Libstdc++ mailing list