如果您确实找不到支持 128 位整数的编译器,您应该使用一些汇编器来复制 Linux 编译器发出的指令。
Please don't tell me to recompile it under windows
You'll have to recompile it under Windows. Sorry!
If you really can't find a compiler with support for 128 bit integers you should use some assembler to replicate the instructions that you Linux compiler emits.
安装后,您可以打开 bash 会话,导航到 /mnt// 并运行可执行文件,就像运行 Linux 一样。
注意:WSL 仍处于测试阶段。
Since Windows 10 Anniversary Update, Windows is able to natively run Linux binaries via Windows Subsystem for Linux (WSL), commonly known as Bash on Ubuntu on Windows.
After installation, you can open a bash session, navigate to /mnt/<driveletter>/<path to your program> and run your executable as if you were running Linux.
使用适用于 Linux 的虚拟机作为主机 Windows 操作系统上的来宾操作系统。在虚拟机下运行可执行文件。但在 gcc-cygwin 组合下编译是最好的选择。
Use a Virtual machine for Linux as Guest OS on your Host Windows OS. Run your executable under the VM. But compiling under gcc-cygwin combine is best bet.
发布评论
评论(5)
没有直接的办法。 Linux 可执行文件的格式与 Windows 完全不同。还有其他几种选择。
cygwin。在cygwin下用GCC编译程序。我相信这将构建一个使用 cygwin 兼容层的 Windows exe。
安装一个像VBox这样的虚拟机。在 VBox 中安装 Linux。在那里运行程序。
http://www.andlinux.org 有一个执行此操作的框架。我从未尝试过,但有一个视频教程 http://www.youtube.com/ watch?v=nULDHPCm9p4.
No direct way. A Linux executable has a radically different format than Windows. There are several other options.
cygwin. Compile the program with GCC under cygwin. I believe that will build a windows exe that uses the cygwin compatibility layer.
install a VM like VBox. Install a Linux in the VBox. Run the program there.
http://www.andlinux.org has a framework for doing this. I've never tried it, but there is a video tutorial http://www.youtube.com/watch?v=nULDHPCm9p4.
在我看来, flinux 可以做到。
从描述来看:
注意:我还没有对此进行测试。
It seems to me, that flinux could do it.
From the description:
Note: I've not tested this.
您必须在 Windows 下重新编译它。对不起!
如果您确实找不到支持 128 位整数的编译器,您应该使用一些汇编器来复制 Linux 编译器发出的指令。
You'll have to recompile it under Windows. Sorry!
If you really can't find a compiler with support for 128 bit integers you should use some assembler to replicate the instructions that you Linux compiler emits.
自 Windows 10 周年更新以来,Windows 能够通过
Windows Subsystem for Linux
(WSL)(通常称为Windows 上的 Ubuntu 上的 Bash
)本地运行 Linux 二进制文件。请参阅https://msdn.microsoft.com/en-us/commandline/wsl
安装后,您可以打开 bash 会话,导航到
/mnt//
并运行可执行文件,就像运行 Linux 一样。注意:WSL 仍处于测试阶段。
Since Windows 10 Anniversary Update, Windows is able to natively run Linux binaries via
Windows Subsystem for Linux
(WSL), commonly known asBash on Ubuntu on Windows
.See https://msdn.microsoft.com/en-us/commandline/wsl
After installation, you can open a bash session, navigate to
/mnt/<driveletter>/<path to your program>
and run your executable as if you were running Linux.Note: WSL is still beta.
使用适用于 Linux 的虚拟机作为主机 Windows 操作系统上的来宾操作系统。在虚拟机下运行可执行文件。但在 gcc-cygwin 组合下编译是最好的选择。
Use a Virtual machine for Linux as Guest OS on your Host Windows OS. Run your executable under the VM. But compiling under gcc-cygwin combine is best bet.