From: Jason Green Newsgroups: comp.os.msdos.djgpp Subject: Re: how to compile c++ program Date: Sat, 05 Feb 2000 18:03:21 +0000 Organization: Customer of Planet Online Lines: 32 Message-ID: <3ono9s0rrlcu5da1r6hho710vpo0klbpa0@4ax.com> References: NNTP-Posting-Host: modem-82.lithium.dialup.pol.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: newsg2.svr.pol.co.uk 949774221 5228 62.136.2.82 (5 Feb 2000 18:10:21 GMT) NNTP-Posting-Date: 5 Feb 2000 18:10:21 GMT X-Complaints-To: abuse AT theplanet DOT net X-Newsreader: Forte Agent 1.7/32.534 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com "mukt1000" wrote: > Hi, > I 'm a new c programmer, I use Djgpp (v2.02) and now I want to jump c++ , The latest version is V2.03 (But that is not the problem) > I know Djgpp is already a c++ compiler,but I cant even compile a hello > world program with it; > > // hello.cpp > #include > void main () > { > cout<<"helo world"; file://or printf("hello world"); MS Outlook inserts file: in front of C++ comments unless you have a space immediately after the // (But that is not the problem either ;-) > } > > command line: d:\djgpp\bin:\> gcc hello.cpp produces lots of errors; > I tried all of the possibilities but compiler doesnt compile cpp files. You need to use gpp for C++ programs: gpp -Wall hello.cpp -o hello This is explained in the file readme.1st And FAQ section 1, "If You Are In a Hurry" If you have not read those then you may have problems using DJGPP.