Is there any way to convert a Linux binary file to windows exe file? For example if in Linux create a very simple binary file like this:
echo "main(){int i; i=i+1;}" >> main.c
gcc main.c -o main
Is there any way to convert main binary file to a windows exe file?
The Windows Subsystem for Linux (WSL) is Microsoft's technology stack that enables native Linux binaries to run in a Windows user environment without the need to install a full fledged Linux distro — native or virtual.
To run a Linux program on Windows, you have these options: Run the program as-is on the Windows Subsystem for Linux (WSL). In WSL your program executes directly on the machine hardware, not in a virtual machine.
You can not convert a linux executeable into a windows executeable. But you can compile the source with cross-compiler.
E.g: MinGw32
if you are in ubuntu:
sudo apt-get install mingw32
i586-mingw32msvc-cc main.c -o main.exe
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With