Mail Archives: djgpp/1995/06/15/01:15:47
> The error messages are:
> "undefined reference to 'cout'"
> "undefined reference to 'ostream::operator<<(char const *)'"
First (and trivial), do you #include <iostream.h>? If so, then this is
what the FAQ says on another possible problem:
8.11 Q: I put all the libraries in the above order, but the linker still
can't find some C++ functions from complex.h and iostream.
A: These functions are declared inline. However, GCC won't inline
them unless you compile with optimizations enabled, so it tries
to find the compiled version of the functions in the library.
Workaround: compile with -O.
The latest version of the FAQ list is available as faq102.zip from the same
place you get DJGPP.
- Raw text -