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

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

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

      1. CXX 编译器标识未知

        时间:2023-08-26
        <legend id='HUJzR'><style id='HUJzR'><dir id='HUJzR'><q id='HUJzR'></q></dir></style></legend>
            <tfoot id='HUJzR'></tfoot>
            • <i id='HUJzR'><tr id='HUJzR'><dt id='HUJzR'><q id='HUJzR'><span id='HUJzR'><b id='HUJzR'><form id='HUJzR'><ins id='HUJzR'></ins><ul id='HUJzR'></ul><sub id='HUJzR'></sub></form><legend id='HUJzR'></legend><bdo id='HUJzR'><pre id='HUJzR'><center id='HUJzR'></center></pre></bdo></b><th id='HUJzR'></th></span></q></dt></tr></i><div id='HUJzR'><tfoot id='HUJzR'></tfoot><dl id='HUJzR'><fieldset id='HUJzR'></fieldset></dl></div>

                  <tbody id='HUJzR'></tbody>

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

                  <bdo id='HUJzR'></bdo><ul id='HUJzR'></ul>
                • 本文介绍了CXX 编译器标识未知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我们在使用 Visual Studio 2012 的 Windows 7 64Bit 下使用 CMake (v2.8.12) 编译项目时遇到问题.CMake 给我们以下错误.我们已经尝试使用管理员权限从 Visual Studio 命令行启动 Cmake.CMake 2.8.11 中似乎有一个类似的错误:http://www.cmake.org/Bug/view.php?id=14440

                  We are having trouble compiling a project using CMake (v2.8.12) under Windows 7 64Bit using Visual Studio 2012. CMake gives us the following errors. We already tried starting Cmake from the Visual Studio Command Line using admin rights. There seems to have been a similar bug in CMake 2.8.11: http://www.cmake.org/Bug/view.php?id=14440

                  CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake:446 (execute_process):
                    execute_process given COMMAND argument with no value.
                  Call Stack (most recent call first):
                    C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake:48 (CMAKE_DETERMINE_COMPILER_ID_VENDOR)
                    C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeDetermineCCompiler.cmake:131 (CMAKE_DETERMINE_COMPILER_ID)
                    CMakeLists.txt:2 (project)
                  
                  
                  The C compiler identification is unknown
                  CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake:446 (execute_process):
                    execute_process given COMMAND argument with no value.
                  Call Stack (most recent call first):
                    C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake:48 (CMAKE_DETERMINE_COMPILER_ID_VENDOR)
                    C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeDetermineCXXCompiler.cmake:127 (CMAKE_DETERMINE_COMPILER_ID)
                    CMakeLists.txt:2 (project)
                  
                  
                  The CXX compiler identification is unknown
                  Could NOT find SWIG (missing:  SWIG_EXECUTABLE SWIG_DIR) 
                  CMake Warning at src/CMakeLists.txt:44 (message):
                    SWIG was not found.  You will not be able to compile for C#.
                  
                  
                  Configuring incomplete, errors occurred!
                  See also "C:/Users/hci/laser_control/CMakeFiles/CMakeOutput.log".
                  See also "C:/Users/hci/laser_control/CMakeFiles/CMakeError.log".
                  

                  推荐答案

                  那些错误信息

                  The C compiler identification is unknown
                  The CXX compiler identification is unknown
                  

                  表示 CMake 确实找到或假设了一个编译器,但它无法编译一个简单的测试程序.

                  means CMake did find or assume a compiler but it wasn't able to compile a simple test program.

                  查看 CMakeFilesCMakeError.log 并检查那里的错误消息以查看:

                  Take a look at CMakeFilesCMakeError.log and check the error message there to see:

                  1. CMake 确实使用了哪个编译器路径/命令行
                  2. 调用编译器的错误信息是什么

                  1. which compiler path/command line CMake did use
                  2. what the error message calling the compiler was

                  例如LINK:致命错误 LNK1181:无法打开输入文件 'kernel32.lib'

                  如果您将 --debug-trycompile 添加到 cmake 调用中,CMake 甚至会保留它尝试测试编译的文件(因此您可以复制/粘贴/重新- 从 cmd shell 中的错误日志运行命令行).

                  If you add --debug-trycompile to the cmake call CMake will even keep the files it has tried to test compile (so you can copy/paste/re-run the command line from the error log in your cmd shell).

                  我上次遇到这个问题......

                  我上次遇到这个问题是在我的 Visual Studio 2012 Professional 标准安装中没有安装任何 Windows SDK(错误日志显示缺少 SDK 标头).

                  The last time I had this problem was when my Visual Studio 2012 Professional standard installation did not install any Windows SDK (the error log was showing an missing SDK header).

                  验证您的 SDK 安装,例如检查您是否安装了任何资源编译器.它应该位于类似于以下内容的路径中:

                  To verify your SDK installation e.g. check that you have any Resource Compiler installed. It should be in a path similar to:

                  C:Program Files (x86)Microsoft SDKsWindowsv[some version]inRC.Exe
                  

                  因为我错过了这个 - 或者更准确的任何 SDK - 我安装了 Windows 8.1 SDK(因为 Visual Studio 2012 确实针对 Windows 8.x),瞧,我的 CMake 再次能够编译(测试)程序.

                  Since I was missing this - or more accurate any SDK - I installed Windows 8.1 SDK (since Visual Studio 2012 does target Windows 8.x) and voila my CMake was able again to compile the (test) programs.

                  参考

                  • Visual Studio 2012 是否包含完整的 Windows SDK
                  • CMake 错误在CMakeLists.txt:30(项目):找不到 CMAKE_C_COMPILER

                  这篇关于CXX 编译器标识未知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:如何从 add_custom_target/command 调用 CMake 函数? 下一篇:无法使用 CMake 找到 Eigen3

                  相关文章

                  <small id='3BcQ7'></small><noframes id='3BcQ7'>

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

                • <legend id='3BcQ7'><style id='3BcQ7'><dir id='3BcQ7'><q id='3BcQ7'></q></dir></style></legend>

                  <tfoot id='3BcQ7'></tfoot>
                    • <bdo id='3BcQ7'></bdo><ul id='3BcQ7'></ul>