Cross compiler for Windows?

dl8dtl

Developer
I see in /usr/ports/MOVED that the mingw32 cross compiler has been abandoned.
Is there any other cross compiler around that can be used to compile for the Windows environment?
 
Is there any other cross compiler around that can be used to compile for the Windows environment?
A bit cheesy but mingw-64 works well under wine. Including cmake.

The inbuilt wine-gcc is close doesn't seem to produce executables that run on a native Windows.
 
Yep, it's a Windows sourcecode I'd like to compile.

OK, I'll give mingw64 a try, thanks!
The specific one I have tried is:


As a hint, win32 rather than posix (I am happy with winpthreads rather than the C11 thread API, (and an annoying side effect of the posix builds is you cannot completely statically link the entire libc and libstdc++ into the executable, it always has an external dependency on a winpthread dll).

Ironically, in that package, gdb is bugged on Windows (backspace doesn't work), but should work in Wine. Either way it can be fixed with an environment variable of sorts.
 
Thanks for the pointer.
I see that MinGW-w64 has been ported even to Macports (and some Linuxes), so I wonder what it would take to also provide a FreeBSD port for it.
I'm not sure, but I don't think the source code I'd like to compile uses threads.
 
Back
Top