# mingw w64 gcc/g++ platform

**URL:** <https://discourse.cmake.org/t/mingw-w64-gcc-g-platform/1602>\
**Category:** Development\
**Created:** [July 21, 2020, 1:59pm UTC](https://discourse.cmake.org/t/mingw-w64-gcc-g-platform/1602 "2020-07-21T13:59:58Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![mipac](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/m/c68b51/32.png) [@mipac](https://discourse.cmake.org/u/mipac)\
**Post date:** [July 21, 2020, 1:59pm UTC](https://discourse.cmake.org/t/mingw-w64-gcc-g-platform/1602/1 "2020-07-21T13:59:58Z")

</div>

System is unknown to cmake, create:  
Platform/MINGW64\_NT-10.0-18363 to use this system, please post your config file on [discourse.cmake.org](http://discourse.cmake.org) so it can be added to cmake

---

<div class="post-metadata">

**Author:** ![brad.king](https://discourse.cmake.org/user_avatar/discourse.cmake.org/brad.king/32/11_2.png) [@brad.king](https://discourse.cmake.org/u/brad.king)\
**Post date:** [July 21, 2020, 2:44pm UTC](https://discourse.cmake.org/t/mingw-w64-gcc-g-platform/1602/2 "2020-07-21T14:44:21Z")

</div>

For reference, the message posted above comes from [this code](https://gitlab.kitware.com/cmake/cmake/-/blob/v3.18.0/Modules/CMakeSystemSpecificInformation.cmake#L28-38) in CMake. It occurs when CMake detects a `CMAKE_SYSTEM_NAME` that is not known.

MinGW is known, but the `CMAKE_SYSTEM_NAME` detected should not be `MINGW64_NT-10.0-18363`. We need to figure out how that name is detected. What version of CMake are you using?

---

<div class="post-metadata">

**Author:** ![mipac](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/m/c68b51/32.png) [@mipac](https://discourse.cmake.org/u/mipac)\
**Post date:** [July 21, 2020, 3:18pm UTC](https://discourse.cmake.org/t/mingw-w64-gcc-g-platform/1602/3 "2020-07-21T15:18:08Z")

</div>

I was using msys/cmake from msys2

it works fine with mingw-w64-x86\_64-cmake, and the mingw-w64 toolschain  
sorry for nois, and hope that could help someone

regards

---

<div class="post-metadata">

**Author:** ![bleblanc18](https://discourse.cmake.org/user_avatar/discourse.cmake.org/bleblanc18/32/1239_2.png) [@bleblanc18](https://discourse.cmake.org/u/bleblanc18)\
**Post date:** [February 25, 2021, 10:00am UTC](https://discourse.cmake.org/t/mingw-w64-gcc-g-platform/1602/4 "2021-02-25T10:00:10Z")

</div>

Hello,

I’m having this same issue. I’m using the latest Feb 2021 build of MSys2, with mingw64. cmake version 3.19.3.

Any update on what could be causing this?

sorry, I’m a noob.  
Best,

---

<div class="post-metadata">

**Author:** ![marc.chevrier](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/m/ecb155/32.png) [@marc.chevrier](https://discourse.cmake.org/u/marc.chevrier)\
**Post date:** [February 25, 2021, 1:57pm UTC](https://discourse.cmake.org/t/mingw-w64-gcc-g-platform/1602/5 "2021-02-25T13:57:00Z")

</div>

MSYS2 is **not** supported. Only `MinGW` is. So, it is required to use `cmake` from `mingw-w64-x86_64-cmake` package.

---

<div class="post-metadata">

**Author:** ![brad.king](https://discourse.cmake.org/user_avatar/discourse.cmake.org/brad.king/32/11_2.png) [@brad.king](https://discourse.cmake.org/u/brad.king)\
**Post date:** [February 25, 2021, 2:36pm UTC](https://discourse.cmake.org/t/mingw-w64-gcc-g-platform/1602/6 "2021-02-25T14:36:18Z")

</div>

We do have nightly testing with MSYS2-installed MinGW 64-bit toolchains (e.g. `/mingw64/bin/gcc`). See builds [here](https://open.cdash.org/index.php?project=CMake&filtercount=1&showfilters=1&field1=buildname&compare1=63&value1=mingw64). One uses the `Ninja` generator. Another uses the `MSYS Makefiles` generator.

What is not supported by upstream CMake is using the MSYS2 native toolchains (e.g. `/usr/bin/gcc`), that produce binaries depending on the msys2 runtime. Support for those compilers is maintained by MSYS2’s CMake packagers in the `msys/cmake` package.

---

<div class="post-metadata">

**Author:** ![bleblanc18](https://discourse.cmake.org/user_avatar/discourse.cmake.org/bleblanc18/32/1239_2.png) [@bleblanc18](https://discourse.cmake.org/u/bleblanc18)\
**Post date:** [February 25, 2021, 2:44pm UTC](https://discourse.cmake.org/t/mingw-w64-gcc-g-platform/1602/7 "2021-02-25T14:44:29Z")

</div>

Thanks for the reply. The issue still existed, but I was able to get through the compile anyway. There was another issue with the newer MSys2 mingw64 binutils.

Thanks for your time.
