Mail Archives: djgpp/1996/01/17/04:12:22
Ian Viemeister <vmeister AT ios DOT com> wrote:
>>merry way until it started spitting out errors when it saw cin and cout
>>(BTW, I did #include<iostream.h>). It didn't give me line numbers for
>
>You have forgotten to add -lgpp to the gcc command line. This tells
>the linker to add in the C++ libs. Please note, this is likely the
>*most* Frequently Asked Question about compiling C++, and it is
>answered in the FAQ (faq102.zip at the DJGPP sites)
I'm having the same stupid problem, but I AM using
gcc -lgpp [filename], and it still does it. Here's my program and the
output:
#include "iostream.h"
void main(void) {
cout << "Hello World!\n";
}
test.cc(.text+0x1c): undefined reference to `cout'
test.cc(.text+0x21): undefined reference to `ostream::operator<<(char
const *)'
- Raw text -