Click to See Complete Forum and Search --> : how do i run programs after i compile them? it's not working


bosch00
03-30-2002, 05:31 AM
ok i'm new to linux, but i'm a comp sci major so i figure why not give it a shot.. so i compiled a c program in a terminal
with gcc test1.c
then i type a.out
which should run it
it says no such command.
so how do i run my programs,
this is how i do it when i telnet through windows and it works fine..

bwkaz
03-30-2002, 09:14 AM
Put a period and a slash in front of a.out.

By default the current directory (dot) is not in the PATH, for security reasons, so you have to tell the shell where to look to find the executable.

kmj
03-30-2002, 12:48 PM
also note, you may have to do 'chmod u+x filename' to make it executable... I don't remember if gcc does this fir yiy,

bosch00
03-30-2002, 01:53 PM
thanks, i knew it had to be something simple like that.
how people are really responsive here.
thanks again, now maybe i can pass this comp sci class.. :(