delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/11/26/17:44:01

From: "A. Sinan Unur" <asu1 AT c-o-r-n-e-l-l DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: about: aout.exe
Date: 26 Nov 2002 20:01:57 GMT
Organization: Cornell University
Lines: 45
Sender: asu1 AT cornell DOT invalid (on 128.253.251.141)
Message-ID: <Xns92D298EB5785Casu1cornelledu@132.236.56.8>
References: <3DDFA0CA DOT 000009 DOT 03244 AT DELL> <Xns92CF728D3F9Aasu1cornelledu AT 132 DOT 236 DOT 56 DOT 8> <63b211f7 DOT 0211240900 DOT a1f0a57 AT posting DOT google DOT com> <Xns92D096DC170A6asu1cornelledu AT 132 DOT 236 DOT 56 DOT 8> <63b211f7 DOT 0211250711 DOT 7d6a37a5 AT posting DOT google DOT com> <OE494A6QlCWie55VI7o00002f38 AT hotmail DOT com> <63b211f7 DOT 0211261104 DOT 5ba122b AT posting DOT google DOT com>
NNTP-Posting-Host: 128.253.251.141
X-Trace: news01.cit.cornell.edu 1038340917 7968 128.253.251.141 (26 Nov 2002 20:01:57 GMT)
X-Complaints-To: usenet AT news01 DOT cit DOT cornell DOT edu
NNTP-Posting-Date: 26 Nov 2002 20:01:57 GMT
User-Agent: Xnews/5.04.25
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

shayoom AT hotmail DOT com (Jonquil) wrote in 
news:63b211f7 DOT 0211261104 DOT 5ba122b AT posting DOT google DOT com:

>> > > command lines:
>> > >
>> > > gcc -Wall -O2 hello.c -o hello.exe
>>      ^^^
>> 
>> For C++ source, use instead
>> 
>> gpp -Wall -O2 hello.c -o hello.exe
>> 
> yes, i tried this line and i think its working here, well, im not
> getting errors ;) .. but there is something that i dont understand...
> i wrote that line in C:\CFILES\ thats where my programs are located,
> and after pressing enter, it took like two seconds for the computer to
> *read* the command line and then i just get C:\CFILES\> again, as if

it read your source, comopiled it, and linked it with the necessary 
libraries to create the executable file, which you can then run by typing 
hello and pressing enter on the command line.

> it just created the hello.exe and not run it... is that whats supposed
> to happen?

yes.

> because i tried to open it manually by locating the
> hello.exe and rclicking on it. it opened and closed quickly.

it is up to you to familiarize yourself with how windows works.

> i have hello.cpp running as a project and it works fine, but i want to
> understand the command the compiles and runs it right away.. i thought
> it was cool.. so please, if you can clear things out for me, that
> would be great.

hope this helps. but you should make an effort to find out how things 
work as well.

-- 
A. Sinan Unur
asu1 AT c-o-r-n-e-l-l DOT edu
Remove dashes for address
Spam bait: mailto:uce AT ftc DOT gov

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019