Mail Archives: djgpp/2002/11/26/17:44:01
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 -