This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
help on running c program on cygwin
- From: David Starks-Browning <starksb at ebi dot ac dot uk>
- To: Lily Tsai <oneray at rupture dot net>
- Cc: cygwin at cygwin dot com
- Date: Thu, 15 Nov 2001 10:55:20 +0000
- Subject: help on running c program on cygwin
- 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/