# Path Quoting Issues on MSYS2 MinGW64 When Building OBS

**URL:** https://discourse.cmake.org/t/path-quoting-issues-on-msys2-mingw64-when-building-obs/2445
**Category:** Usage
**Created:** [December 30, 2020, 4:37am UTC](https://discourse.cmake.org/t/path-quoting-issues-on-msys2-mingw64-when-building-obs/2445 "2020-12-30T04:37:49Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![R030t1](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/r/5f9b8f/32.png) [@R030t1](https://discourse.cmake.org/u/R030t1)
#### Post date: [December 30, 2020, 4:37am UTC](https://discourse.cmake.org/t/path-quoting-issues-on-msys2-mingw64-when-building-obs/2445/1 "2020-12-30T04:37:49Z")

</div>

CMake tries to run “`C:msys64mingw64bincc.exe`”. I’ve tried to set the compiler explicitly but no dice. Is that the solution and what is the proper way, or is there something else?

```auto
$ /mingw64/bin/cmake .. -GNinja -DQTDIR=DISABLE_UI
-- The C compiler identification is GNU 10.2.0
-- The CXX compiler identification is GNU 10.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: C:/msys64/mingw64/bin/cc.exe
-- Check for working C compiler: C:/msys64/mingw64/bin/cc.exe - broken
CMake Error at C:/msys64/mingw64/share/cmake-3.19/Modules/CMakeTestCCompiler.cmake:66 (message):
  The C compiler

    "C:/msys64/mingw64/bin/cc.exe"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: C:/Users/R0b0t1/Devel/obs-studio/build_mingw64/CMakeFiles/CMakeTmp

    Run Build Command(s):C:/msys64/usr/bin/ninja.exe cmTC_c467a && [1/2] Building C object CMakeFiles/cmTC_c467a.dir/testCCompiler.c.obj
    FAILED: CMakeFiles/cmTC_c467a.dir/testCCompiler.c.obj
    C:\msys64\mingw64\bin\cc.exe -o CMakeFiles/cmTC_c467a.dir/testCCompiler.c.obj -c testCCompiler.c
    /bin/sh: C:msys64mingw64bincc.exe: command not found
    ninja: build stopped: subcommand failed.

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:8 (project)

-- Configuring incomplete, errors occurred!
See also "C:/Users/R0b0t1/Devel/obs-studio/build_mingw64/CMakeFiles/CMakeOutput.log".
See also "C:/Users/R0b0t1/Devel/obs-studio/build_mingw64/CMakeFiles/CMakeError.log".

```

---

<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: [December 30, 2020, 9:14am UTC](https://discourse.cmake.org/t/path-quoting-issues-on-msys2-mingw64-when-building-obs/2445/2 "2020-12-30T09:14:52Z")

</div>

`MinGW64` tools are `windows` tools, so they expect an environment supporting `windows` paths (i.e. with drive letter and backslashes).  
You have to install the `MinGW64` version of ninja (package `mingw-w64-x86_64-ninja`) to have a usable environment.
