Cross-compilation is always painful no matter the system, but for me I use mingw(and gcc of course) because I can use my Linux host to compile for multiple platforms (Linux, Windows, macOS and Android)
Yeah. The pain of cross-compilation makes it often easier to grab an actual system of the target variety to do your building - which is a pain for some systems, but much less so for Linux. That's why I expect to hear much more about "it's so annoying trying to build a Windows binary on Linux" than "it's so annoying trying to build a Linux binary on Windows".
It's actually not really that painful if you create a docker container for everything you want to build to. This will work for linux/aarch64/mingw. It starts getting painful when you support something like armv6 (Raspberry Pi Zero W) because you need a sysroot... and there are multiple layers that can mess up. In your case MacOS and Anroid would be toughest. MacOS not really being worth it due to licensing.
View all comments
Show parent comment
4
u/Time-Worker9846 Sep 03 '26
Cross-compilation is always painful no matter the system, but for me I use mingw(and gcc of course) because I can use my Linux host to compile for multiple platforms (Linux, Windows, macOS and Android)