On Fri, 4 Sep 1998, Bumpurs, C. Shane wrote:
> compiled it via gcc or ecgs and it makes an a.out
> I can rename a.out to whatever I want.
> But when I try to run the thing in the shell it says it can't find it.
> if I use xfm it displays the output in the shell that I run xfm from.
> I'm used to DOS so what am I doing wrong?
> 

Assuming you renamed a.out to prog1 you would type

./prog1

This causes the shell to look in the current directory for a executable
called prog1.  By default my systems are not set up to execute a program
in the current directory.  Also the -o <executable name> option in gcc
will name your executable correctly instead of defaulting to a.out.

i.e.
gcc code.c -o myprogram 

This will produce an executable called myprogram created from the code.c
source file.

Hope by ramblings help.

    .......  [EMAIL PROTECTED]
     `:::'     Kevin Sivits  .......  ......
      :::  *                  `::.    ::'    one world
      ::: .::  .:.::.  .:: .::  `::. :'      one people 
      :::  ::   ::  ::  ::  ::    :::.      one goverment
      ::: .::. .::  ::.  `::::. .:'  ::.       one OS
    ..:::.....................::'   .::::.


Reply via email to