delorie.com/archives/browse.cgi | search |
X-Authentication-Warning: | delorie.com: mailnull set sender to djgpp-bounces using -f |
From: | "ElShifty" <elshifty AT yahoo DOT com> |
Newsgroups: | comp.os.msdos.djgpp |
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> |
Subject: | Re: Newbie Question |
Lines: | 38 |
X-Priority: | 3 |
X-MSMail-Priority: | Normal |
X-Newsreader: | Microsoft Outlook Express 6.00.2600.0000 |
X-MimeOLE: | Produced By Microsoft MimeOLE V6.00.2600.0000 |
Message-ID: | <P0K18.356712$oj3.69577748@typhoon.tampabay.rr.com> |
Date: | Fri, 18 Jan 2002 00:30:39 GMT |
NNTP-Posting-Host: | 24.28.6.63 |
X-Complaints-To: | abuse AT rr DOT com |
X-Trace: | typhoon.tampabay.rr.com 1011313839 24.28.6.63 (Thu, 17 Jan 2002 19:30:39 EST) |
NNTP-Posting-Date: | Thu, 17 Jan 2002 19:30:39 EST |
Organization: | RoadRunner - TampaBay |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
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; } "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). > > > >
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |