linking iostream

Plechámíd Martin Martin.Plechsmid@merlin.cz
Tue Sep 4 00:23:00 GMT 2001


Title: linking iostream





Hello.


In which lib-file are stored methods for iostream? The linker complains that
it cannot find the iostream functions when "iostream" used:


  test.o: In function `main':
  test.o(.text+0xa): undefined reference to `endl(ostream &)'
  test.o(.text+0x17): undefined reference to `cout'
  test.o(.text+0x1c): undefined reference to `ostream::operator<<(char const
*)'
  test.o(.text+0x27): undefined reference to `ostream::operator<<(ostream
&(*)(ostream &))'
  collect2: ld returned 1 exit status


I use Red Hat Linux 7.1, gcc has version 2.96.
I might have the gcc libraries badly installed, as to other stdlib objects
(like "vector" or "set") the linker linkes without any problem.


    Thank you,
                        Martin.






More information about the Libstdc++ mailing list