
MXE: Windows cross-compile environment for Unix - blacksqr
http://mxe.cc
======
rwmj
Fedora has been doing this since 2008:
[https://fedoraproject.org/wiki/MinGW](https://fedoraproject.org/wiki/MinGW)

Apparently there are now 222 cross-compiled Windows packages:
[https://admin.fedoraproject.org/pkgdb/packages/mingw-%2A/](https://admin.fedoraproject.org/pkgdb/packages/mingw-%2A/)

(Disclaimer: I was involved with this project at the beginning, but I've not
used it for a while)

------
adrianratnapala
This is potentially very useful. Especially because it comes "batteries
included" by cross compiling some important cross-platform libraries.

My experience with C and C++ is that, as great as the differences between
Windows and Unix APIs are, the real friction comes from the differences in
compilers and toolchains.

There is much good to be said about Visual Studio. But if you are interested
in cross-platform, it is probably a lot easier to maintain a single Unix-based
build system as long as you have an easy way to test the products under
Windows.

~~~
pjmlp
The problem with cross-compiling is that one always requires the complete set
of libraries to target, which in the end at least for desktop and server
systems is much more convenient to have a VM instance for it than a cross-
compiler.

------
sounds
I did not see anywhere on [http://mxe.cc](http://mxe.cc) that said it compiled
Windows binaries?

~~~
adrianratnapala
You are right, the authors are carrying on the grand web tradition of making
whole sites about how great "Foo" without ever saying _what_ Foo is.

But it is difficult to imagine what is compiled by the MingGW toolchain other
than Windows binaries.

Arguably the table entries "i686-w64-mingw32" and "x86_64-w64-mingw32" also
explicitly name Windows, in a very cryptic, GNU-specific way.

~~~
voltagex_
If anyone wants to improve the website, open an issue on
[https://github.com/mxe/mxe](https://github.com/mxe/mxe) or raise a pull
against the gh-pages branch.

------
FiloSottile
Related, here is a one-click-install OS X to Linux cross compiler, based on
musl libc and its Makefiles.

[https://github.com/FiloSottile/homebrew-musl-
cross](https://github.com/FiloSottile/homebrew-musl-cross)

$ brew install FiloSottile/musl-cross/musl-cross

~~~
rogerdpack
nice, I hope it gets merged into mainline :)

------
bfuller
At first I thought this was about the research chemical designer drug that was
very popular but recently completely disappeared due to a ban in china

~~~
coredog64
Corporate WebSense agrees with you and blocks my access for that reason.

------
frik
Has anyone looked at the screenshot section? Is that Windows 98 and a photo
from a CRT screen? Looks like a pretty old page.

~~~
skoczymroczny
Wow. To be honest, that's what most "Windows screenshots" look like for non-
Windows projects. For some reason people have an aversion to newer versions of
Windows and Aero is usually disabled for screenshots. Similar thing is when
people call GUI like here:
[http://i.stack.imgur.com/Qdbsi.png](http://i.stack.imgur.com/Qdbsi.png)
"windows native"

------
richel
I am using MXE happily for a couple of years already (some projects I've
cross-compiled are here:
[http://richelbilderbeek.nl/CppMxe.htm](http://richelbilderbeek.nl/CppMxe.htm)
). IMHO it is awesome! Before MXE, I had a Windows computer with the only
purpose to compile my code on. Life is better now.

------
pwdisswordfish
How is that better than just installing the MinGW cross-compiler (and setting
PKG_CONFIG_PATH) on my own?

------
amckinlay
How are pthreads supported on Windows?

~~~
rossy
mingw-w64 comes with a pthreads implementation that works on top of the
Windows API:
[https://github.com/mirror/mingw-w64/tree/master/mingw-w64-li...](https://github.com/mirror/mingw-w64/tree/master/mingw-w64-libraries/winpthreads/src)

------
__b__
Any similar projects aimed at compiling Linux binaries on non-Linux Unix?
(Excluding qemu, etc.)

Some non-Linux Unix have Linux emulation and can translate a subset of Linux
syscalls. Perhaps it could be in a chroot with all the needed Linux libraries
and utils.

But I am curious if there have been existing projects aimed at this goal.

------
Keyframe
Now, if we could only get OSX C/C++ programs to compile/use
libraries,frameworks on Linux... then we could have one build VM for them all.

------
IsmaOlvey
If you're on Gentoo, sys-devel/crossdev is useful for creating cross-
compilers.

------
baq
I've used this 5 years ago, back when it was called mingw-cross-env - it
worked great.

------
AndyKelley
I use MXE to build libsoundio releases for Windows. It works wonderfully.

------
markuman
GNU Octave is using it for its windows binaries.

------
adamkruszewski
Um, you need screenshots for a cross-compiler? :)

~~~
kalleboo
Any excuse to show off that sweet Titanic98 wallpaper!

