www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/07/12/00:53:43

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
Message-ID: <37897458.4D47FD33@dgs.monash.edu.au>
Date: Mon, 12 Jul 1999 14:51:36 +1000
From: Brendan Simon <brendan AT dgs DOT monash DOT edu DOT au>
Reply-To: brendan AT dgs DOT monash DOT edu DOT au
Organization: CTAM Pty Ltd
X-Mailer: Mozilla 4.61 [en] (X11; I; Linux 2.0.36 i586)
X-Accept-Language: en
MIME-Version: 1.0
To: Ajoy Victor <dajoy AT hoy DOT net>
CC: cygwin AT sourceware DOT cygnus DOT com
Subject: Re: Problems with Hello World.
References: <19990712034632 DOT AAA17768 AT default>

Ajoy Victor wrote:

> [~] $hello
> BASH.EXE: hello: command not found

UNIX type shells work a little differently to MS-DOS shells.  MS-DOS
shells will try to find an executable in the current directory by
default where as UNIX shells will not.  You have to type "./hello" or
"./hello.exe" for it to work.  You can add the current directory to your
path with "export PATH=.:$PATH" and then you can just type "hello" or
"hello.exe".  Put the above export statement in one of your startup
scripts.  eg. .bashrc, .profile, etc.

Another thing is to make sure the file has executable permissions.  Use
"chmod +x <file>" to give the permissions.  I can see by your directory
listing that the file has the correct permissions so that is OK.

The file is very big due to debugging info probably.  You can try "strip
hello.exe" to remove this.

Hope this helps a bit,
Brendan Simon.



--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019