This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Problems with Hello World.


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@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]