From: Michael Numminen Newsgroups: comp.os.msdos.djgpp Subject: Re: [Q] Can djgpp compile the C++ source ??? Date: Thu, 22 Jan 1998 11:36:38 +0100 Organization: Ericsson Microwave Systems AB Lines: 40 Message-ID: <34C72136.2519@emw.ericsson.se> References: <34c7ce4e DOT 2169674 AT news DOT kreonet DOT re DOT kr> NNTP-Posting-Host: disney.emw.ericsson.se Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Kim,Young-Jae wrote: > > Hi all... > I'm a beginner of DJGPP... > I've received some binary files in http://www.delorie.com/dgjpp > and installed to the directory c:\djgpp, and done all things in the > web page describing to install... > And I typed some source file and command to compile it... > c:\> gcc arraynew.cpp -o arraynew.exe > but it reports various error message, which says it cannot load > "iostream.h"... > I've found that "iostream.h" is in the directory "c:\djgpp\lang\cxx" > not in the directory "c:\djgpp\include"... > > The following is my source code... > > Plz, let me know whether djgpp can compile C++ code or not !!! > > #include > int main(void) > { > double *p3 = new double[3]; > p3[2] = 0.2; > p3[1] = 0.5; > p3[0] = 0.8; > > cout << "p3[1] is " << p3[1] << ".\n"; > p3 = p3+1; > cout << "Now p3[0] is " << p3[0] << ".\n"; > cout << "p3[1] is " << p3[1] << ".\n"; > return 0; > } Hi! You must compile with options -lgpp, like this: c:\> gcc arraynew.cc -lgpp -o arraynew.exe Miche