From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26658 invoked by alias); 27 Aug 2011 08:17:37 -0000 Received: (qmail 26649 invoked by uid 22791); 27 Aug 2011 08:17:35 -0000 X-SWARE-Spam-Status: No, hits=-1.1 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rs2.shuttle.de (HELO rs2.shuttle.de) (194.95.249.4) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 27 Aug 2011 08:17:16 +0000 Received: by rs2.shuttle.de (Postfix, from userid 10) id 1A50658D74; Sat, 27 Aug 2011 10:17:15 +0200 (CEST) Received: from hal9000.schweikhardt.net (localhost [127.0.0.1]) by hal9000.schweikhardt.net (8.14.4/8.14.4) with ESMTP id p7R8GsK9003573 for ; Sat, 27 Aug 2011 10:16:54 +0200 (CEST) (envelope-from schweikh@hal9000.schweikhardt.net) Received: (from schweikh@localhost) by hal9000.schweikhardt.net (8.14.4/8.14.4/Submit) id p7R8GsVc003572 for cygwin@cygwin.com; Sat, 27 Aug 2011 10:16:54 +0200 (CEST) (envelope-from schweikh) Date: Sat, 27 Aug 2011 08:17:00 -0000 From: Jens Schweikhardt To: cygwin@cygwin.com Subject: Re: Bash: Cannot execute binary file Message-ID: <20110827081654.GA3281@schweikhardt.net> 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> 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@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2011-08/txt/msg00491.txt.bz2 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