From owner-freebsd-questions Sat Jan 15 7:30: 0 2000 Delivered-To: freebsd-questions@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id DE87D14E79 for ; Sat, 15 Jan 2000 07:29:55 -0800 (PST) (envelope-from bright@fw.wintelcom.net) Received: (from bright@localhost) by fw.wintelcom.net (8.9.3/8.9.3) id HAA28641; Sat, 15 Jan 2000 07:52:31 -0800 (PST) Date: Sat, 15 Jan 2000 07:52:31 -0800 From: Alfred Perlstein To: Mikhail Evstiounin Cc: freebsd-questions@FreeBSD.ORG, "Ray D. Davis" Subject: Re: How to run compiled program Message-ID: <20000115075231.O508@fw.wintelcom.net> References: <003301bf5f6b$237d0b00$d0353018@evstiouninadelphia.net.pit.adelphia.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <003301bf5f6b$237d0b00$d0353018@evstiouninadelphia.net.pit.adelphia.net>; from evstiounin@adelphia.net on Sat, Jan 15, 2000 at 10:11:23AM -0500 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG * Mikhail Evstiounin [000115 07:34] wrote: > I don't remember exatly when FreeBSD started to use new executable format, > but try to do following first: > ./ntest > > A lot of times one doesn't have the current directory in your path (it does > make sense, because it more secure) and system doesn't want > to recognize any command in the current directory. > > -----Original Message----- > From: Ray D. Davis > To: freebsd-questions@FreeBSD.ORG > Date: Friday, January 14, 2000 8:42 PM > Subject: How to run compiled program > > > >I am on ver 2.8. I have compiled an equivalent of hello world in both c > >and c++ using both the default a.out method and the -o option. Yet when I > >try to execute the file which is supposed to be linked, by typing > >the file name, eg. ntest, the system says ntest: not a command. Looking at > >the contents of the file it > >appears more like an object file than executable. What is the dumb thing I > >am doing??? > > The dumb thing is not telling us how you are compiling the program, you should be doing something like this: gcc hello.c -o hello ./hello -Alfred To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message