Skip site navigation (1)Skip section navigation (2)
Date:      05 Jan 2001 09:52:15 -0500
From:      Lowell Gilbert <lowell@world.std.com>
To:        freebsd-questions@freebsd.org, ummacius@cc.UManitoba.CA
Subject:   Re: g++ and a.out
Message-ID:  <44r92i3vc0.fsf@lowellg.ne.mediaone.net>
In-Reply-To: ummacius@cc.UManitoba.CA's message of "4 Jan 2001 17:10:14 %2B0100"
References:  <Pine.GSO.4.20.0101041007530.4087-100000@toliman.cc.umanitoba.ca>

next in thread | previous in thread | raw e-mail | index | archive | help
ummacius@cc.UManitoba.CA (Maciuszonek Artur) writes:

> Hi, I've written  a basic hello world program.  It compiles fine but when
> I try to execute the file a.out I receive the message:
> hello.out: Command not found
> Am I missing a path declaration for the program directory? Any ideas?

I'm a little confused about whether the executable you built is called
"a.out" or "hello.out".  However, I'm pretty sure that this is Unix
programming question #1:

The "current directory" isn't on your path.  For security reasons, 
we recommend that you leave it that way.  Run a file in the current
directory by prefixing it with "./".  

# ./a.out
Hello, world!
#


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44r92i3vc0.fsf>