|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
#1 |
|
Member (5 bit)
Join Date: May 2004
Location: Connecticut
Posts: 19
|
how to execute a.out?
i used "gcc filename.c" to compile my program and it created a file named a.out i am geusing that's the file i need to run in order to run my program...but heres the thing i dont know the linux command to run it...any one have any ideas?
|
|
|
|
|
|
#2 |
|
usual suspect
Join Date: Jun 2002
Location: not here
Posts: 2,051
|
just navigate to the folder where the file is and type a.out, it will run itself
craig
__________________
the universe is against this current wave of success i'm having. -johnny drama, entourage |
|
|
|
|
|
#3 |
|
Barefoot on the Moon!
Staff
Premium Member
Join Date: Aug 2002
Location: Northeastern USA
Posts: 13,285
|
Also, if you want to save it, you will have to rename it, otherwise it will be overwritten the next time you compile something.
__________________
There are two secrets to staying young, being happy, and achieving success. You have to laugh and find humor every day, and you have to have a dream.
|
|
|
|
|
|
#4 |
|
Member (5 bit)
Join Date: May 2004
Location: Connecticut
Posts: 19
|
i just typed a.out in the console in the folder where a.out is located and is said "a.out command not found"...?
|
|
|
|
|
|
#5 |
|
usual suspect
Join Date: Jun 2002
Location: not here
Posts: 2,051
|
is the command you used above exactly what you used. could you have put a filename after that to output it to? i haven't done compiling in awhile, so i don't remember all the commands, but i know that you could just have it go to a file rather than a.out
craig |
|
|
|
|
|
#6 |
|
Member (5 bit)
Join Date: May 2004
Location: Connecticut
Posts: 19
|
no that's exactly as i put in the command...ive done it before and its worked...i think it might be because im connecting to a linux machine remotely using ssh...awell...thanks for the help though
|
|
|
|
|
|
#7 |
|
usual suspect
Join Date: Jun 2002
Location: not here
Posts: 2,051
|
just for giggle sake, i telneted back into my old unix system at another university and it compiled and ran just fine, so i know that the sequence you are using is prolly right, then. could just be something on their end maybe
craig |
|
|
|
|
|
#8 |
|
Member (8 bit)
|
cd to the directory with the file then chmod u+rx a.out then to run it: ./a.out
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|