This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Bash: Cannot execute binary file
- From: Jens Schweikhardt <schweikh at schweikhardt dot net>
- To: cygwin at cygwin dot com
- Date: Sat, 27 Aug 2011 10:16:54 +0200
- Subject: Re: Bash: Cannot execute binary file
- References: <31263793.post@talk.nabble.com> <20110329013343.GD12793@ednor.casa.cgf.cx> <31263838.post@talk.nabble.com> <20110329015306.GE12793@ednor.casa.cgf.cx> <4D914393.5090409@cs.umass.edu> <0105D5C1E0353146B1B222348B0411A209E396A241@NIHMLBX02.nih.gov> <loom.20110827T073659-437@post.gmane.org>
On Sat, Aug 27, 2011 at 05:50:06AM +0000, srinu wrote:
# Hi,
#
# This problem is very frequently occuring irrespective of executable.
# A new laptop, windows7, downloaded the Cygwin with utmostcare in slecetingthe
# desired and permissions.
# Wrote simple programe in c ( simple such that: print "hello world").
# while try to run the executable created throws the error: cannot execute
# binary file.
#
# flow is like follows:
# C file created: Hello.c ( full permissions)
# Compiled and linked: gcc -c Hello.c -o helloTest
You get what you asked for with -c, an object file. Instead use
gcc Hello.c -o helloTest
which creates an executable.
Regards,
Jens
--
Jens Schweikhardt http://www.schweikhardt.net/
SIGSIG -- signature too long (core dumped)
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple