X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.1 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Date: Sat, 27 Aug 2011 10:16:54 +0200 From: Jens Schweikhardt To: cygwin AT cygwin DOT com Subject: Re: Bash: Cannot execute binary file Message-ID: <20110827081654.GA3281@schweikhardt.net> References: <31263793 DOT post AT talk DOT nabble DOT com> <20110329013343 DOT GD12793 AT ednor DOT casa DOT cgf DOT cx> <31263838 DOT post AT talk DOT nabble DOT com> <20110329015306 DOT GE12793 AT ednor DOT casa DOT cgf DOT cx> <4D914393 DOT 5090409 AT cs DOT umass DOT edu> <0105D5C1E0353146B1B222348B0411A209E396A241 AT NIHMLBX02 DOT nih DOT gov> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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