# \--rc=rc --mt=CMAKE\_MT-NOTFOUND

**URL:** <https://discourse.cmake.org/t/rc-rc-mt-cmake-mt-notfound/5089>\
**Category:** Development\
**Tags:** os:windows\
**Created:** [February 22, 2022, 3:22pm UTC](https://discourse.cmake.org/t/rc-rc-mt-cmake-mt-notfound/5089 "2022-02-22T15:22:34Z")\
**Posts on this page:** 3\
**Page:** 2

<div class="post-metadata">

**Author:** ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)\
**Post date:** [May 1, 2023, 3:18pm UTC](https://discourse.cmake.org/t/rc-rc-mt-cmake-mt-notfound/5089/21 "2023-05-01T15:18:22Z")

</div>

> [@rvjr](#):
>
> the Python3 installer inserted the `python/scripts` folder at the very beginning of the `PATH` environment variable, resulting in `reg.py` being executed instead of the `reg` command line tool when

That is…cruel. Have you filed an issue with the provider of that installer about this?

---

<div class="post-metadata">

**Author:** ![harishch4](https://discourse.cmake.org/user_avatar/discourse.cmake.org/harishch4/32/3543_2.png) [@harishch4](https://discourse.cmake.org/u/harishch4)\
**Post date:** [June 22, 2023, 5:02am UTC](https://discourse.cmake.org/t/rc-rc-mt-cmake-mt-notfound/5089/22 "2023-06-22T05:02:34Z")

</div>

I got this resolved by adding “C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64” to PATH, but now it throws below error:

```auto
CMake Error at C:/Program Files/Microsoft Visual Studio/2022/Professional/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.26/Modules/CMakeTestCCompiler.cmake:67 (message):
  The C compiler

    "C:/Users/hchambet/work/aocc/llvm-build/Release/bin/clang-cl.exe"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: C:/Users/hchambet/work/aocc/classic_flang/runtime/libpgmath/build/CMakeFiles/CMakeScratch/TryCompile-17pqcp

    Run Build Command(s):C:/PROGRA~1/MIB055~1/2022/PROFES~1/Common7/IDE/COMMON~1/MICROS~1/CMake/Ninja/ninja.exe -v cmTC_c8719 && [1/2] C:\Users\hchambet\work\aocc\llvm-build\Release\bin\clang-cl.exe /nologo /DWIN32 /D_WINDOWS /W3 /MDd /Zi /Ob0 /Od /RTC1 /showIncludes /FoCMakeFiles\cmTC_c8719.dir\testCCompiler.c.obj /FdCMakeFiles\cmTC_c8719.dir\ -c -- C:\Users\hchambet\work\aocc\classic_flang\runtime\libpgmath\build\CMakeFiles\CMakeScratch\TryCompile-17pqcp\testCCompiler.c
    [2/2] cmd.exe /C "cd . && "C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E vs_link_exe --intdir=CMakeFiles\cmTC_c8719.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\mt.exe --manifests -- C:\PROGRA~1\MIB055~1\2022\PROFES~1\VC\Tools\MSVC\1436~1.325\bin\Hostx64\x64\link.exe /nologo CMakeFiles\cmTC_c8719.dir\testCCompiler.c.obj /out:cmTC_c8719.exe /implib:cmTC_c8719.lib /pdb:cmTC_c8719.pdb /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:console kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
    FAILED: cmTC_c8719.exe
    cmd.exe /C "cd . && "C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E vs_link_exe --intdir=CMakeFiles\cmTC_c8719.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\mt.exe --manifests -- C:\PROGRA~1\MIB055~1\2022\PROFES~1\VC\Tools\MSVC\1436~1.325\bin\Hostx64\x64\link.exe /nologo CMakeFiles\cmTC_c8719.dir\testCCompiler.c.obj /out:cmTC_c8719.exe /implib:cmTC_c8719.lib /pdb:cmTC_c8719.pdb /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:console kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
    LINK Pass 1: command "C:\PROGRA~1\MIB055~1\2022\PROFES~1\VC\Tools\MSVC\1436~1.325\bin\Hostx64\x64\link.exe /nologo CMakeFiles\cmTC_c8719.dir\testCCompiler.c.obj /out:cmTC_c8719.exe /implib:cmTC_c8719.lib /pdb:cmTC_c8719.pdb /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:console kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:CMakeFiles\cmTC_c8719.dir/intermediate.manifest CMakeFiles\cmTC_c8719.dir/manifest.res" failed (exit code 1104) with the following output:
    LINK : fatal error LNK1104: cannot open file 'kernel32.lib'
    ninja: build stopped: subcommand failed.

```

I tried adding library path to “PATH”, but it didn’t work. Any idea on how to solve this?

---

<div class="post-metadata">

**Author:** ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)\
**Post date:** [June 25, 2023, 7:53pm UTC](https://discourse.cmake.org/t/rc-rc-mt-cmake-mt-notfound/5089/23 "2023-06-25T19:53:00Z")

</div>

The Microsoft toolchain requires a lot more than just `PATH`. You should really use `vcvarsall.bat` to load the toolchain environment.

[Previous page](https://discourse.cmake.org/t/rc-rc-mt-cmake-mt-notfound/5089.md?page=1)
