Build for Windows under Ubuntu MinGW CMake

In this post I will describe the process of building libraries and applications for Windows using the MinGW32 toolchain on Ubuntu. Install wine, mingw: sudo apt-get install wine mingw-w64 After this, you can already build C/C++ applications for Windows: # C i686-w64-mingw32-gcc helloWorld.c -o helloWorld32.exe # 32-bit x86_64-w64-mingw32-gcc helloWorld.c -o helloWorld64.exe # 64-bit # C++ [ ]