I am building a large cross-platform suite of commandline programs, no
issues with older MINGW on Win7 (32bit) system - Cmake recognises
platform id MINGW.
Now trying MINGW32 on Windows 10 (64bit OS, but I a targetting 32bit
WIN32), Cmake (v 3.21.1) reports this error:
System is unknown to cmake, create:
Platform/MINGW32_NT-10.0-19043
Of course, I need a working CMake ID for the platform, so that
appropriate flags and symbols are passed to the compiler.
I have attached my CopyOfCmakeCache.txt as instructed in error message.
I welcome any solution, even if a workaround to begin with.
MSYS2 comes with two variants of cmake: one that targets the msys2 runtime, and one that targets Windows with the GNU ABI (mingw). Which cmake package are you using?
Thank you for a very quick reply. Sorry but I am relatively new to
MinGW generally, and vey new indeed to MSYS2 etc on Windows 10.
The requirement is to target Windows ( this is an LGPL github
distribution, the Cmakefiles support Mac and Linux too).
I installed msys2 using downloaded msys2-x86_64-20210725.exe, which gave
me four options in the Windows taskbar under “MSYS2 64bit” - including
MSYS2-minGW 32-bit and MSYS2 MinGW 64bit, the former ostensibly the one
I need to use.
Nothing much seemed available immediately, I had to use ‘pacman’ for all
of gcc, git and Cmake - I simply asked for 'cmake", not knowing what
other name options might be available. That is the cmake which proved
to offer no Generators for MinGW or MSVC. So I assume that is the answer
to your question, it must be the msys2 version.
At the moment, I have uninstalled the pacman cmake, and installed the
standard external Windows CMake from cmake.og, which has all the
expected Generators including Mingw32, and suffice it to say I have now
successfully built all programs for 32bit WIN32 using our existing
CMakefiles. But I would like to be able to use the “internal” MinGW-32
cmake, etc as it seems much tidier, self-contained - less to document
for users, ideally.