*BSD News Article 54584


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!yarrina.connect.com.au!munnari.OZ.AU!spool.mu.edu!howland.reston.ans.net!swrinde!gatech2!news.mathworks.com!tank.news.pipex.net!pipex!sunsite.doc.ic.ac.uk!demon!mail2news.demon.co.uk!beckley.demon.co.uk
From: Ian W Taylor <iwta@beckley.demon.co.uk>
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: compiled program won't run.
Date: Sat, 11 Nov 95 09:59:34 GMT
Organization: Glencarn Ltd.
Lines: 19
Message-ID: <816083974snz@beckley.demon.co.uk>
References: <480g7u$t2e@news.csus.edu>
Reply-To: iwta@beckley.demon.co.uk
X-NNTP-Posting-Host: beckley.demon.co.uk
X-Newsreader: Demon Internet Simple News v1.30

In article <480g7u$t2e@news.csus.edu> wleong@sfsu.edu "WEE-KING LEONG" writes:

>     I got the freeBSD up but I have a problem in getting something
> to work. I have written a simple program and it compile nicely with
> gcc. But when I tried to run it, I got error saying "command not
> found" Any idea what went wrong?

If you have compiled your program and produced an executable in
your current directory you will probably find that your current
directory is not in the PATH environmental variable.

So set 
    PATH=.:$PATH

before trying to execute your program.
-- 
Regards,
   Ian T.