来自Windows Cmd的Cygwin Bash未运行可执行文件

Cha*_*ing 2 windows bash cygwin exe

我有一个我在cygwin编译的程序,我试图从批处理文件中调用一个la:

D:\cygwin\bin\bash --login -i C:/ILS/trunk/NAVAID/test.exe
Run Code Online (Sandbox Code Playgroud)

但是我收到了错误:

bash: C:/ILS/trunk/NAVAID/test.exe: cannot execute binary file
Run Code Online (Sandbox Code Playgroud)

当我在cygwin中提交test.exe时,我得到:

test.exe: PE32 executable (console) Intel 80386, for MS Windows
Run Code Online (Sandbox Code Playgroud)

任何想法为什么它不会运行?我在网上找到的大多数错误来自试图运行Linux应用程序的人,但这是在cygwin(在同一台机器上)直接编译(通过g ++).

在Windows 8上,如果重要的话.

Jay*_*yan 5

你可以试试 -c <command >

D:\cygwin\bin\bash --login -c C:/ILS/trunk/NAVAID/test.exe
Run Code Online (Sandbox Code Playgroud)

这在bash shell下运行test.exe.有关-c选项的详细信息

调用时可能会提供几个单字符选项,这些选项在set builtin中不可用.

-c string处理选项后从字符串读取并执行命令,然后退出.任何剩余的参数都分配给位置参数,从$ 0开始.

-i启动一个交互式shell,在这种情况下,这不是你想要的.

最后为了完成 - bash可以--rcfile <file path>选择提供启动文件.