delorie.com/archives/browse.cgi | search |
X-Authentication-Warning: | delorie.com: mailnull set sender to djgpp-bounces using -f |
Message-ID: | <3C47AFDE.386BDE01@yahoo.com> |
From: | CBFalconer <cbfalconer AT yahoo DOT com> |
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: | <PdI18.355893$oj3 DOT 69419736 AT typhoon DOT tampabay DOT rr DOT com> <zhJ18.1497$XA5 DOT 176148 AT news000 DOT worldonline DOT dk> <P0K18.356712$oj3 DOT 69577748 AT typhoon DOT tampabay DOT rr DOT com> |
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" <jl1204 AT worldonline DOT dk> 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 <iostream> > 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)
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |