Mail Archives: djgpp/1996/03/17/10:33:00
When I try to run this simple program:
#include <iostream.h>
main()
{
cout << "Well, hi there.\n" ;
return 0;
}
I get the compiler error messges "undefined reference to 'cout'
"undefined reference to 'ostream:operator <<(char const *)'"
iostream.h is in directory c:\djgpp\cplusinc and in djgpp.env this directory is
listed in the CPP section. I am compiling with the command
gcc test.cc.
The environment is as follows:COMSPEC=C:\DOS\COMMAND.COM
BLASTER=A220 I7 D1 H5 T4
SYMANTEC=C:\SYMANTEC
PROMPT=$p$g
PATH=C:\NU;C:\QEMM;C:\NDW;C:\DOS;C:\WINDOWS;C:\NC;C:\BATCH;C:\JAZZ;
C:\DJGPP\BIN;
NU=C:\NU
DJGPP=c:/djgpp/djgpp.env
GO32TMP=c:/djgpp/tmp
windir=C:\WINDOWS
I am running all of this from the DOS prompt, not through Windows.
Please tell me how to get the compiler to recognize cout.
Thanks
- Raw text -