Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Jan 2001 09:57:10 -0800
From:      David <davidd@datasphereweb.com>
To:        Maciuszonek Artur <ummacius@cc.UManitoba.CA>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: g++ and a.out
Message-ID:  <20010104095710.A8135@datasphereweb.com>
In-Reply-To: <Pine.GSO.4.20.0101041007530.4087-100000@toliman.cc.umanitoba.ca>; from ummacius@cc.UManitoba.CA on Thu, Jan 04, 2001 at 10:10:02AM -0600
References:  <Pine.GSO.4.20.0101041007530.4087-100000@toliman.cc.umanitoba.ca>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jan 04, 2001 at 10:10:02AM -0600, Maciuszonek Artur wrote:
> 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?

If you're trying to execute a.out it probably won't help trying to execute 'hello.out'. Not sure
if this is a typo or not.

If you're not able to execute a.out by simply typing it it's probably not in your $PATH. You can
execute a.out by prepending it with ./ ie: ./a.out

If a.out is not a workable name for a binary you can compile with a -o flag:
g++ -o helloworld hello.cpp

This creates a binary named helloworld.

-- 
|> /\ \/ @
davidd@datasphereweb.com
DataSphere - Back end web programming, site security, and networking

david.daugherty@netmanage.com
Software Engineer
NetManage - The Bridge to E-Business

http://www.wcug.wwu.edu/~doc
ICQ: 21106703

"I like the dreams of the future better than the history of the past"
                                   -Thomas Jefferson


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?20010104095710.A8135>