X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f Message-ID: <3C47AFDE.386BDE01@yahoo.com> From: CBFalconer Organization: Ched Research X-Mailer: Mozilla 4.75 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Re: Newbie Question References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 41 Date: Fri, 18 Jan 2002 06:44:59 GMT NNTP-Posting-Host: 12.90.167.217 X-Complaints-To: abuse AT worldnet DOT att DOT net X-Trace: bgtnsc04-news.ops.worldnet.att.net 1011336299 12.90.167.217 (Fri, 18 Jan 2002 06:44:59 GMT) NNTP-Posting-Date: Fri, 18 Jan 2002 06:44:59 GMT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com ElShifty wrote: > > "Jesper Lund" wrote in message > news:zhJ18.1497$XA5 DOT 176148 AT news000 DOT worldonline DOT dk... > > > OK... Here's is what I have done so far. I downloaded all the > > > basic stuff for DJGPP. I followed all the instructions > > > correctly. Now all I want to do is just write .CPP files in > > > notepad and compile them as executables. How would I go about > > > using GCC.exe to simply compile a .cpp file into a basic .exe? > > > I am only using standard libraries (i.e. iostream, string, etc). > > > Any help would be appreciated. > > > > Read the file readme.1st (which is in your root DJGPP directory). > > Ok I read all of the readme file and I see that it says nothing of > how to compile C++ source code to an executable. So I tried what > it said for C code which was "gcc myfile.c -o myfile.exe -lm". So > I tried "gcc mycppsource.cpp -o cppexe.exe -lm". It then displayed > A LOT of errors about undefined references. I tried it with very > simple source and am stumped as to why it doesn't work. The code I > tried was: > > #include > using namespace std; > > int main() > { > cout << "Hello, World!\n"; > return 0; > } Try "info gxx". g++ is an illegal filename under DOS. Use the extension cpp for C++ sources. -- Chuck F (cbfalconer AT yahoo DOT com) (cbfalconer AT XXXXworldnet DOT att DOT net) Available for consulting/temporary embedded and systems. (Remove "XXXX" from reply address. yahoo works unmodified) mailto:uce AT ftc DOT gov (for spambots to harvest)