Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sources.redhat.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@sources.redhat.com>
List-Help: <mailto:cygwin-help@sources.redhat.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@sources.redhat.com
Delivered-To: mailing list cygwin@sources.redhat.com
Date: Thu, 15 Nov 2001 10:55:20 +0000
Message-ID: <672-Thu15Nov2001105520+0000-starksb@ebi.ac.uk>
X-Mailer: emacs 20.7.1 (via feedmail 9-beta-7 I);
	VM 6.92 under Emacs 20.7.1
From: David Starks-Browning <starksb@ebi.ac.uk>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
To: Lily Tsai <oneray@rupture.net>
Cc: cygwin@cygwin.com
Subject: help on running c program on cygwin
In-Reply-To: <20011114184729.T49708-100000@froody.rupture.net>
References: <20011114184729.T49708-100000@froody.rupture.net>

Lily,

I hate to be the third to reply but I didn't find the first two
responses satisfactory.

On Wednesday 14 Nov 01, Lily Tsai writes:
> 
> I just installed Cygwin on XP and tried running a simple helloworld in c.
> After a good compilation using gcc, I get nothing when trying to run the
> outputfile.
> 
> $gcc helloworld.c -o helloworld.exe
> 
> $helloworld.exe
> 
> 
> nothing.

That depends what you mean by "nothing".  If bash says "command not
found", then read the FAQ entry:

	Bash says "command not found", but it's right there!

If *truly* nothing happens, then I have no explanation.

> When I double-click on the helloworld.exe icon on Windows Explorer, I get
> an error prompt:
> 
> "This application has failed to start because cygwin1.dll was not found.
> Re-installing the application may fix this problem."

That's because Windows does not have C:\cygwin\bin (or wherever you
installed Cygwin) in its PATH environment variable.

Someone with Windows XP will have to tell you how to remedy this.  On
NT the "System" control panel lets you set environment variables.  On
9x you can add something to autoexec.bat.

Cygwin will set the PATH for you when you invoke the Bash shell from
the "Cygwin" shortcut.  But that doesn't help when you double-click an
executable from Windows Explorer.

Hope this helps.

Regards,
David
(Cygwin FAQ maintainer)


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

