• <tfoot id='eSKaP'></tfoot>

      <bdo id='eSKaP'></bdo><ul id='eSKaP'></ul>

      <small id='eSKaP'></small><noframes id='eSKaP'>

    1. <i id='eSKaP'><tr id='eSKaP'><dt id='eSKaP'><q id='eSKaP'><span id='eSKaP'><b id='eSKaP'><form id='eSKaP'><ins id='eSKaP'></ins><ul id='eSKaP'></ul><sub id='eSKaP'></sub></form><legend id='eSKaP'></legend><bdo id='eSKaP'><pre id='eSKaP'><center id='eSKaP'></center></pre></bdo></b><th id='eSKaP'></th></span></q></dt></tr></i><div id='eSKaP'><tfoot id='eSKaP'></tfoot><dl id='eSKaP'><fieldset id='eSKaP'></fieldset></dl></div>
      1. <legend id='eSKaP'><style id='eSKaP'><dir id='eSKaP'><q id='eSKaP'></q></dir></style></legend>
      2. 在 VS 2015 命令提示符中不再找到 rc.exe

        rc.exe no longer found in VS 2015 Command Prompt(在 VS 2015 命令提示符中不再找到 rc.exe)

            <small id='71ssy'></small><noframes id='71ssy'>

              <legend id='71ssy'><style id='71ssy'><dir id='71ssy'><q id='71ssy'></q></dir></style></legend>
            • <tfoot id='71ssy'></tfoot>
                <i id='71ssy'><tr id='71ssy'><dt id='71ssy'><q id='71ssy'><span id='71ssy'><b id='71ssy'><form id='71ssy'><ins id='71ssy'></ins><ul id='71ssy'></ul><sub id='71ssy'></sub></form><legend id='71ssy'></legend><bdo id='71ssy'><pre id='71ssy'><center id='71ssy'></center></pre></bdo></b><th id='71ssy'></th></span></q></dt></tr></i><div id='71ssy'><tfoot id='71ssy'></tfoot><dl id='71ssy'><fieldset id='71ssy'></fieldset></dl></div>
                  <bdo id='71ssy'></bdo><ul id='71ssy'></ul>

                    <tbody id='71ssy'></tbody>
                  本文介绍了在 VS 2015 命令提示符中不再找到 rc.exe的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我刚刚安装了 Windows 10 创意者更新(版本 10.0.15063).

                  I just installed Windows 10 Creators Update (version 10.0.15063).

                  我安装了多个版本的 Visual Studio(2012、2013、2015 和 2017).我几周前才安装了 VS 2017.

                  I have multiple versions of Visual Studio installed (2012, 2013, 2015 and 2017). I installed VS 2017 only a couple weeks ago.

                  CMake(3.8.1 版)在VS2015 x64 本机命令提示符"中运行时不再找到 C/C++ 编译器(在 VS 2017 命令提示符中运行时它确实正常工作).

                  CMake (version 3.8.1) no longer finds the C/C++ compiler when run inside a "VS2015 x64 Native Command Prompt" (it does work properly when run inside a VS 2017 command prompt).

                  CMakeLists.txt 的内容:

                  project (test)
                  add_executable (test test.cpp)
                  

                  (test.cpp 的内容无关.)

                  CMake 调用,在 VS2015 x64 本机命令提示符中:

                  CMake invocation, in a VS2015 x64 Native Command Prompt:

                  > mkdir build
                  > cd build
                  > cmake -G "Visual Studio 14 2015 Win64" ..
                  

                  CMake 输出:

                  -- The C compiler identification is unknown
                  -- The CXX compiler identification is unknown
                  CMake Error at CMakeLists.txt:1 (project):
                    No CMAKE_C_COMPILER could be found.
                  
                  CMake Error at CMakeLists.txt:1 (project):
                    No CMAKE_CXX_COMPILER could be found.
                  
                  -- Configuring incomplete, errors occurred!
                  See also "D:/dev/cmaketest/build/CMakeFiles/CMakeOutput.log".
                  See also "D:/dev/cmaketest/build/CMakeFiles/CMakeError.log".
                  

                  分析

                  查看CMakeFiles/CMakeError.log就很清楚失败的原因了:

                  Analysis

                  The reason of the failure is clear when looking at CMakeFiles/CMakeError.log:

                  ClCompile:
                    C:Program Files (x86)Microsoft Visual Studio 14.0VCinx86_amd64CL.exe /c /nologo /W0 /WX- /Od /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"Debug\" /Fd"Debugvc140.pdb" /Gd /TC /errorReport:queue CMakeCCompilerId.c
                    CMakeCCompilerId.c
                  Link:
                    C:Program Files (x86)Microsoft Visual Studio 14.0VCinx86_amd64link.exe /ERRORREPORT:QUEUE /OUT:".CompilerIdC.exe" /INCREMENTAL:NO /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /PDB:".CompilerIdC.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:".CompilerIdC.lib" /MACHINE:X64 DebugCMakeCCompilerId.obj
                  LINK : fatal error LNK1158: cannot run 'rc.exe' [D:devcmaketestuildCMakeFiles3.8.1CompilerIdCCompilerIdC.vcxproj]
                  

                  rc.exe(资源编译器)未找到.确实,在同一个 VS 2015 命令提示符下:

                  rc.exe (Resource Compiler) is not found. Indeed, in the same VS 2015 command prompt:

                  > where rc.exe
                  INFO: Could not find files for the given pattern(s).
                  

                  虽然它在 VS 2013 命令提示符中找到的:

                  While it is found in a VS 2013 command prompt:

                  > where rc.exe
                  C:Program Files (x86)Windows Kits8.1inx64
                  c.exe
                  C:Program Files (x86)Windows Kits8.1inx86
                  c.exe
                  

                  和 VS 2017 命令提示符:

                  and a VS 2017 command prompt:

                  > where rc.exe
                  C:Program Files (x86)Windows Kits10in10.0.15063.0x64
                  c.exe
                  

                  在各种VS命令提示中检查PATH环境变量的内容:

                  Checking the content of the PATH environment variables in various VS command prompts:

                  • 在 VS 2013 命令提示符中,PATH 包含

                  C:Program Files (x86)Windows Kits8.1inx64
                  

                • 在 VS 2017 命令提示符中,PATH 包含

                  C:Program Files (x86)Windows Kits10inx64
                  C:Program Files (x86)Windows Kits10in10.0.15063.0x64
                  

                • 但是在 VS 2015 命令提示符中,PATH 只包含

                  C:Program Files (x86)Windows Kits10inx64
                  

                  不包含rc.exe.

                  1. 这是一个已知问题还是特定于我的系统?

                  1. Is this a known issue or is it specific to my system?

                  Windows 10 Creators Update 可能会在系统中安装、卸载或更改哪些会触发此问题的内容(可能与 Windows SDK 相关)?

                  What could Windows 10 Creators Update possibly install, uninstall or alter in the system (perhaps something related to Windows SDKs) that would trigger this problem?

                  有什么干净的方法可以解决这个问题?

                  What is a clean way to resolve this?

                  已安装 VS 2017 组件:

                  Installed VS 2017 components:

                  推荐答案

                  花了一些时间在安装了 Win10 Creators Edition 和 VS2010、VS2013、VS2015 和 VS2017 的三台机器上查看这个问题,它在两台机器上工作,但在第三.所有人都安装了 VS2015 Update 3,并且都应该使用相同的选项进行安装.

                  Spent some time looking at this on three machines with Win10 Creators Edition and VS2010, VS2013, VS2015 and VS2017 installed, where it works on two machines and fails on the third. All had VS2015 Update 3 and all should have been installed with the same options.

                  运行以下批处理文件

                  C:Program Files (x86)Microsoft Visual Studio 14.0VCinamd64vcvars64.bat
                  

                  应该为 VS2015 x64 环境设置正确的环境.这应该添加

                  should setup the correct environment for VS2015 x64 environment. This should add

                  C:Program Files (x86)Windows Kits10inx64
                  

                  到路径.这是 rc.exe 应该在的地方.然而,在我出现故障的机器上 rc.exe 从这里丢失,但它确实存在于

                  to the PATH. This is where rc.exe should be. However on my failing machine rc.exe was missing from here, but it did exist in

                  C:Program Files (x86)Windows Kits10in10.0.15063.0x64
                  

                  我回去后感觉这是一个设置问题,我重新运行了 VS2015 Update 3 设置并告诉它添加

                  I went back and feeling like this was a setup issue I re-ran the VS2015 Update 3 setup and told it to add

                  Windows 和 Web 开发 -> 通用 Windows 应用程序开发工具 -> 工具 (1.4.1) 和 Windows 10 SDK (10.0.14393)

                  这导致 rc.exe 和相关文件出现在

                  this caused rc.exe and related files to appear in

                  C:Program Files (x86)Windows Kits10inx64
                  

                  C:Program Files (x86)Windows Kits10in10.0.15063.0x64
                  c.exe
                  

                  C:Program Files (x86)Windows Kits10inx64
                  c.exe
                  

                  给出相同的版本号10.0.10011.16384

                  不确定为什么原始安装中缺少 rc.exe,但重新运行安装并添加其他 SDK 为我修复了它.看起来像

                  Not sure why rc.exe was missing from the original install, but re-running the install and adding the other SDK fixed it for me. It looks like

                  C:Program Files (x86)Windows Kits10inx64
                  c.exe
                  

                  应该是默认的 rc.exe 但它不是由以前的安装设置的.

                  should be the default rc.exe but it was not setup by a previous install.

                  这篇关于在 VS 2015 命令提示符中不再找到 rc.exe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!
                • 相关文档推荐

                  What is inside .lib file of Static library, Statically linked dynamic library and dynamically linked dynamic library?(静态库、静态链接动态库和动态链接动态库的 .lib 文件里面是什么?)
                  How do I load a C DLL from the SXS in Python?(如何从 Python 中的 SXS 加载 C DLL?)
                  Can Cython code be compiled to a dll so C++ application can call it?(Cython 代码可以编译成 dll 以便 C++ 应用程序可以调用它吗?)
                  Delay Loading DLLs(延迟加载 DLL)
                  Throwing C++ exceptions across DLL boundaries(跨 DLL 边界抛出 C++ 异常)
                  Loading a dll from a dll?(从 dll 加载 dll?)

                  <legend id='KyvT9'><style id='KyvT9'><dir id='KyvT9'><q id='KyvT9'></q></dir></style></legend><tfoot id='KyvT9'></tfoot>
                      1. <small id='KyvT9'></small><noframes id='KyvT9'>

                        <i id='KyvT9'><tr id='KyvT9'><dt id='KyvT9'><q id='KyvT9'><span id='KyvT9'><b id='KyvT9'><form id='KyvT9'><ins id='KyvT9'></ins><ul id='KyvT9'></ul><sub id='KyvT9'></sub></form><legend id='KyvT9'></legend><bdo id='KyvT9'><pre id='KyvT9'><center id='KyvT9'></center></pre></bdo></b><th id='KyvT9'></th></span></q></dt></tr></i><div id='KyvT9'><tfoot id='KyvT9'></tfoot><dl id='KyvT9'><fieldset id='KyvT9'></fieldset></dl></div>

                            <bdo id='KyvT9'></bdo><ul id='KyvT9'></ul>
                              <tbody id='KyvT9'></tbody>