www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/03/17/10:33:00

Date: 17 Mar 96 10:21:41 EST
From: "James N. Domingue" <76162 DOT 3324 AT compuserve DOT com>
To: gcc gurus <djgpp AT sun DOT soe DOT clarkson DOT edu>
Subject: djgpp
Message-Id: <960317152140_76162.3324_GHM45-1@CompuServe.COM>

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019