From: "John M. Aldrich" Newsgroups: comp.os.msdos.djgpp Subject: Re: [Q] newbie question... Date: Thu, 11 Dec 1997 19:08:01 +0000 Organization: Two pounds of chaos and a pinch of salt Lines: 41 Message-ID: <34903A11.3567@cs.com> References: Reply-To: fighteer AT cs DOT com NNTP-Posting-Host: ppp203.cs.com 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 Tron wrote: > > djgpp is a c++ compiler isnt??? how can i compile c file name.cpp with > gcc... > > like we do with c files > example: gcc -Wall -c name.c bla...bla...bla... I assume that after this command, you use something like: gcc -o name.exe name.o Otherwise, that '-c' parameter isn't going to do what you expect. In any case, there are two things you must to in order to build C++ programs with DJGPP. You must install the C++ compiler and libraries (v2gnu/gpp2721b.zip and v2gnu/lgp271b.zip), and you must link the C++ libraries when you compile. In one step: gcc -Wall -o name.exe name.cpp -lgpp In two steps: gcc -Wall -c name.cpp gcc -o name.exe name.o -lgpp You can also substitute 'gxx' for 'gcc', which adds '-lgpp' to the command line automatically. This is all in the documentation, btw, which I suggest you read. hth -- --------------------------------------------------------------------- | John M. Aldrich | "Money is truthful. If a man speaks | | aka Fighteer I | of his honor, make him pay cash." | | mailto:fighteer AT cs DOT com | | | http://www.cs.com/fighteer | - Lazarus Long | ---------------------------------------------------------------------