With the Win64 patches I just submitted to wine-patches, I'm able to successfully build Win64-enabled Wine and execute the following 64-bit winelib (winelib64? wine64lib?) application:
#include "windows.h"
int WINAPI WinMain(HINSTANCE hinst, HINSTANCE hprev, LPSTR cmdline, int cmdshow) { DWORD Written;
WriteFile(GetStdHandle(STD_OUTPUT_HANDLE), "Hello, world\r\n", 14, &Written, NULL);
return 0; }
Unfortunately, compiling the above app as a true 64-bit HELLO64.EXE using Microsoft Visual Studio and then executing it using Wine doesn't work. The problem is that the calling convention for functions is different between MSVC and GCC generated apps. Basically, MSVC puts the function arguments in registers RCX, RDX, R8, R9 while GCC puts function arguments in registers RDI, RSI, RDX, RCX, R8, R9. I guess we'll have to wait for true .EXE support until someone teaches GCC the MSVC calling convention.
To prevent confusion: the "normal" 32-bit Wine version runs fine on x86_64 Linux. This is the version you'll want to use, it allows you to run 32-bit Windows stuff. The remarks above are about running 64-bit Windows executables which are virtually non-existant at the moment.
Gé van Geldorp.