Reputation: 5065
How do you compile and link a 64 bit Windows assembly program in Linux
I already know to run
nasm -f win64 generic_assembly.asm -o generic_output
But after that I can't just run
ld generic_output -o generic_executable.exe
and I have tried using GoLink.exe with wine but I am still skeptical as to whether it is actually working
Maybe I could use Mingw-w64 but I have no clue on how that would work
Any help would be appreciated I am mostly just looking for a linker that I can run from linux but otherwise a linker for Windows would also be appreciated.
Upvotes: 2
Views: 2427
Reputation: 5065
To link the objects for 64 bit Windows from Linux install x86_64-w64-mingw32-gcc
. To do this follow these steps:
sudo ln -s /opt/mingw64/bin/x86_64-w64-mingw32-g++ /usr/bin/mingw64-g++
Now you have installed a cross compiler for Windows 64 bit, if you want the 32 bit version do the same but use this link.
Upvotes: 2