Mail Archives: djgpp/1996/10/09/07:26:43
On 8 Oct 1996, Kim Robert Blix wrote:
> compiled with "gcc hello.C" ..
> I get a "undefined reference to 'cout'"
> and "undefined reference to 'ostream::operator<<(char *)'
> (not sure if the last line is 100 percent correct though.)
The FAQ clearly advises (in section 8.7) to use `gxx' rather than `gcc'
when compiling C++ program, like so:
gxx hello.C
(Btw, I suggest you call your C++ source files .cc, to avoid the problems
of DOS case-insensitivity.)
`gxx' will then automatically instruct the linker to search the
appropriate C++ libraries, and you won't see those error messages
anymore.
- Raw text -