delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/08/27/04:08:19

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.2 required=5.0 tests=AWL,BAYES_50,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,TW_YG,T_TO_NO_BRKTS_FREEMAIL
X-Spam-Check-By: sourceware.org
Message-ID: <4E58A5CD.1020300@gmail.com>
Date: Sat, 27 Aug 2011 10:07:41 +0200
From: Marco atzeri <marco DOT atzeri AT gmail DOT com>
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:6.0) Gecko/20110812 Thunderbird/6.0
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Bash: Cannot execute binary file
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> <loom DOT 20110827T073659-437 AT post DOT gmane DOT org>
In-Reply-To: <loom.20110827T073659-437@post.gmane.org>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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 8/27/2011 7:50 AM, srinu wrote:
> Buchbinder, Barry (NIH/NIAID) [E]<BBuchbinder<at>  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

start from here:

> Problem reports:       http://cygwin.com/problems.html


further questions:
- local disk or network disk ?
- results of "ls -l helloTest" ?


--
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019