delorie.com/archives/browse.cgi | search |
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: | <37896A33.7031EF7B@topic.com.au> |
Date: | Mon, 12 Jul 1999 14:08:19 +1000 |
From: | Geoff Appleby <geoff AT topic DOT com DOT au> |
X-Mailer: | Mozilla 4.6 [en] (WinNT; I) |
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: > Here is my hello world program: > > [~] $cat hello.c > main () { > printf ("Hello\n"); > } Lovely :) > I compile it: > > [~] $gcc hello.c -o hello That would be correct :) > I see it is there: > > [~] $dir > hello.c hello.exe man.cfg sh.exe Yes, it is. > I try to run it: > > [~] $hello > BASH.EXE: hello: command not found > > Some more tries: > > [~] $HELLO > BASH.EXE: HELLO: command not found > [~] $hello.exe > BASH.EXE: hello.exe: command not found > [~] $HELLO.exe > BASH.EXE: HELLO.exe: command not found > > It doesn't work from within the terminal window but it works from > the outside: Double clicking on it. That's problem 1. Here's the answer for problem 1 (my guess at least). You don't have dot in your path - try doing $ export PATH=.:$PATH or alternatively, run it using $ ./hello > Here is problem 2: > > [~] $ls -l > total 194 > drwxr-xr-x 2 dajoy everyone 0 Jul 11 21:38 ./ > drwxr-xr-x 16 dajoy everyone 0 Dec 31 1969 ../ > -rw-r--r-- 1 dajoy everyone 3831 Jul 11 21:39 .bash_history > -rwxr-xr-x 1 dajoy everyone 283 Jan 30 19:16 .bash_login* > -rw-r--r-- 1 dajoy everyone 193 Jul 10 00:45 .bashrc > -rw-r--r-- 1 dajoy everyone 869 Jan 26 11:03 .emacs > -rw-r--r-- 1 dajoy everyone 20 Jul 11 20:02 .less > -rw-r--r-- 1 dajoy everyone 26 Jul 11 20:02 .lesskey > -rw-r--r-- 1 dajoy everyone 6926 Jan 26 11:03 .swarmArchiver > -rw-r--r-- 1 dajoy everyone 35 Jul 11 22:37 hello.c > -rwxr-xr-x 1 dajoy everyone 299710 Jul 11 22:37 hello.exe* > -rw-r--r-- 1 dajoy everyone 82 Jul 9 13:50 man.cfg > -rwxr-xr-x 1 dajoy everyone 68608 Dec 1 1998 sh.exe* > > hello.exe is HUGE. Why? What am I doing wrong? It will be that huge (and on mine, it's 302k). It full of lovely symbols and stuff. try a: $strip hello.exe It will drop down to about 3k :) -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |