Mail Archives: djgpp/1997/02/01/00:08:23
Eolo Perfido wrote:
>
> c:/develop/tmp\ccdaaaaa(.text+0x16):a1.cc: undefined reference to
> 'cout'
> c:/develop/tmp\ccdaaaaa(.text+x1b):a1.cc: undefined reference to
> 'ostream:operator (((char const *)'
>
> Someone understand what is happening ?????
>
> P.s:I have c++ installed.
Yeah, but you have to instruct the compiler to link the C++ libraries.
The FAQ discusses this problem in chapter 8.2 (I think), but the quick
answer is to do one of the following:
1) add '-lgpp' to your command line.
2) use 'gxx' instead of 'gcc' to compile your programs; it links the C++
libs automatically.
--
John M. Aldrich <fighteer AT cs DOT com>
* Anything that happens, happens.
* Anything that, in happening, causes something else to happen,
causes something else to happen.
* Anything that, in happening, causes itself to happen again, happens
again.
* It doesn't necessarily do it in chronological order, though.
--- Douglas Adams
- Raw text -