From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27308 invoked by alias); 27 Aug 2011 05:55:27 -0000 Received: (qmail 27299 invoked by uid 22791); 27 Aug 2011 05:55:25 -0000 X-SWARE-Spam-Status: No, hits=0.1 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED,FORGED_YAHOO_RCVD,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,RP_MATCHES_RCVD,SPF_HELO_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from lo.gmane.org (HELO lo.gmane.org) (80.91.229.12) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 27 Aug 2011 05:55:10 +0000 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QxBrF-000770-Ji for cygwin@cygwin.com; Sat, 27 Aug 2011 07:55:05 +0200 Received: from c-67-161-28-100.hsd1.ca.comcast.net ([67.161.28.100]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 27 Aug 2011 07:55:05 +0200 Received: from srinuaprl by c-67-161-28-100.hsd1.ca.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 27 Aug 2011 07:55:05 +0200 To: cygwin@cygwin.com From: srinu Subject: Re: Bash: Cannot execute binary file Date: Sat, 27 Aug 2011 05:55:00 -0000 Message-ID: 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-Transfer-Encoding: 7bit User-Agent: Loom/3.14 (http://gmane.org/) 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/msg00489.txt.bz2 Buchbinder, Barry (NIH/NIAID) [E] niaid.nih.gov> writes: > > Eliot Moss sent the following at Monday, March 28, 2011 10:28 PM > >Why not just use the Windows version and invoke it from cygwin (if > >cygwin is the environment from which you want to do that)? It is easy > >to invoke Windows programs from cygwin; you just need to remember to > >format any arguments in the form the Windows program wants. To that end, > >cygpath is a useful utility, e.g.: > > > >function acrobat () { } > > command acrobat $(cygpath -wa ${1}) > >} > > > >in your .bashrc file allows you to invoke Windows acrobat with a path > >rewritten from cygwin format to Windows format. This can be improved to > >check for presence of the argument ${1}, etc., but perhaps you get the > >idea. > > - You should probably also add some quotes, in case your paths have spaces. > - A complete path to acrobat will avoid needing to have it in your path. > - Using cygstart will get you back to your command prompt. > > function acrobat () { > if [ -f "${1}" ] > then > cygstart '/path/acrobat' "$(cygpath -wa "${1}")" > else > echo "error: file `${1}' not found!" > fi > } > > Note: I have not tested the above. Debugging is left as an exercise for > the user. > > - You also might look at cyg-wrapper.sh, found here: > http://hermitte.free.fr/cygwin/ > Note: I don't use it so YMMV. > > Good luck. > > - Barry > Disclaimer: Statements made herein are not made on behalf of NIAID. > > 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 chmod 777 helloTest ./helloTest bash: ./helloTest : cannot execute binary file Tried all options which I know, googled no clue. I tried in other machines too, same error. I think something is missing, earlier used to work on my old system. But last few months I tried several times reinstalling, new machines which I got for personal use. Is there any solution or inputs please. regards, ramana -- 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