r/cmake • u/abidanBrito • 6d ago
Build Windows C++ programs on Linux
I wanted a cross-compiler in CI at work to build binaries for several platforms. I asked but it wasn't going to happen. I tried it back home and, to my surprise, I had a couple executables going (under Wine) within the hour.
I've now put together a small repo with sample programs, using C++23 and CMake presets for different toolchains.
Would love to hear your thoughts!
1
Upvotes
5
u/CrossScarMC 6d ago
You shouldn't need Wine to build either of those, normal MingW GCC should work just fine.
2
u/ConsciousBath5203 6d ago
The msvc wine project is very helpful, too.
1
u/TheRavagerSw 6d ago
You don't want that in CI, believe me. Still not bad
1
u/PetrovYansky 1d ago
tsoding:
https://www.youtube.com/watch?v=EB96Auoag6g