Start with the file command to find out what type of binary you have:
file ./file
If this is not an executable file, this is the problem. If it is an ELF executable, then it is probably intended to run on Linux, not Windows. For example, compare the output with this command:
file /bin/bash
which should tell you:
/ bin / bash: PE32 executable (console) Intel 80386 (divided into external PDB), for MS Windows
Now try the following command:
file /cygdrive/c/windows/write.exe
Which says the following: /cygdrive/c/windows/write.exe: executable file PE32 + (GUI) x86-64 for MS Windows
I ran this on a 64 bit installation of Windows 7, so it says x86-64. Although this is a Windows GUI application that is completely unrelated to cygwin, I can still start it with the command:
/cygdrive/c/windows/write
You really didn't explain how you got this binary called ./file . Is it possible that this is an object file from compilation that you have not yet associated with the executable file? If you have a Makefile, why not post its contents?
source share