VS2015/VS2017:C compiler identification is unknown
問題
最近在使用VS2015和VS2017時,都遇到了使用CMake發生如下錯誤:
C compiler identification is unknown
The CXX compiler identification is unknown
首先宣告,在使用CMake之前都已經使用VS2015/VS2017編寫過簡單的C/C++程式,測試證明VS已經安裝成功。
另外也不存在在CMake時選擇了錯誤的Generator。
原因
排除以上兩種情況後,網上的大部分教程都無法參考。
經過大量的測試,發現問題原因如下:
自VS2015之後,VS的安裝包日益增大。導致在安裝時,並不需要也不可能安裝所有工具包,因此需要手動安裝VS,根據需要的工具包。由於只使用C/C++,我只選擇性安裝了標題帶有C/C++相關的功能包。雖然在使用VS工具編譯C/C++時,並沒有什麼問題,但是在使用CMake時可能會遭遇缺少一些工具包而導致問題。
另一方面是,VS2017是非常新的編譯器,請務必下載最新的CMake才能保證正常工作。
解決方案
VS2015
一定注意安裝Win10 SDK,如下圖:
VS2017
1. 下載最新的CMake
2. 安裝必須的元件,如下圖
保證Win10 SDK被選中,如下圖:
相關推薦
VS2015/VS2017:C compiler identification is unknown
問題 最近在使用VS2015和VS2017時,都遇到了使用CMake發生如下錯誤: C compiler identification is unknown The CXX compiler identification is unknown 首先宣告,在
VS2015環境配置Cmake過程報錯—— The C compiler identification is unknown解決方案
錯誤日誌報錯 LINK : fatal error LNK1158: cannot run 'rc.exe'解決方案: 1、把C:\Program Files (x86)\Windows Kits\8.1\bin\x86加入系統變數PATH中。(如果用的是64位編譯器將C:
The C compiler identification is unknown解決方案
win10系統,VS2015 CMake錯誤: The C compiler identification is unknown The CXX compiler identification is unknown CMake Error in CMakeLists.
The C compiler identification is unknown No CMAKE_C_COMPILER could be found
技術 多版本 直接 tps studio sts ima cat 選項 當前系統環境: 1、Windows 7中文旗艦版 2、Visual studio 2017、Visual studio 2019 3、Cmake 3.8.1 報錯信息: The C compiler
解決cmake使用過程中The C compiler identification is unknown 或者The CXX compiler identification is unknown問題
屬於編譯器沒有進行安裝,可以根據你的系統選擇在命令列中執行下面的命令。 RedHat-based yum install gcc gcc-c++ Debian/Ubuntu-based apt-get install cmake gcc g++ 如
解決CMake錯誤:The CXX compiler identification is unknown
CMake 選擇了 VS2015 進行配置,在執行 Configure 的時候,出現如下錯誤: The CXX compiler identification is unknown 引起這個錯誤的原因是 CMake 找不到 C++ 的編譯器,檢查 V
Cmake+vs2015編譯Opencv-contrib報錯“CXX compiler identification is unknown ”解決方法
由於opencv3版本以後SIFT等特徵檢測演算法被放在了Opencv-contrib庫中,所以需要用Cmake進行編譯 ,但是用Cmake編譯時,出現編譯器找不到的問題,這是由於vs2015沒有完整安裝C++模組。 問題如下: The C compil
CMake The CUDA compiler identification is unknown
編譯MXNet程式碼一直被CMake卡在了找不到Cuda編譯器,原來是安裝的CDUA版本要和Visual studio匹配才行,也就是選擇Visual studio能夠編譯相應的CUDA,因為CUDA往往不能匹配新版本的編譯器。
nginx安裝錯誤:c compiler cc is not found
今天安裝軟體nginx的時候遇到的報錯:c compiler cc is not found 查了下網上的資料,解決方案也不復雜。
CentOS6.8中安裝Nginx時出現 C compiler gcc is not found問題
已經按照好gcc之後還是會顯示 C compiler gcc is not found問題,嘗試了網上很多安裝gcc的方法都不可用。 1.原因分析: configure首先會編譯一個小測試程式,通過測試其執行結果來判斷編譯器是否能正常工作,由於交叉編譯器所編譯出的程式是無法在編譯主機上執
“./configure: error: C compiler cc is not found”
gcc和c++裝完之後配置nginx的時候還會報cc找不到 錯誤:“./configure: error: C compiler cc is not found” 解決方法: CC=gcc expo
滴滴雲安裝nginx時候報錯nginx c compiler cc is not found
[[email protected] nginx-1.12.1]# ./configure --prefix=/usr/local/nginx checking for OS + Linux 3.10.0-514.16.1.el7.x86_64 x86_64 c
nginx報錯:./configure: error: C compiler cc is not found, gcc 是已經安裝了的
x86 config bin share install 嘗試 found clas error: 源碼安裝nginx報錯,找不到gcc,但是實際上gcc是存在的,如下: # ./configure checking for OS + Linux 3.10.0
FFMPEG系列三:linux下編譯ffmpeg報錯gcc is unable to create an executable file C compiler test failed.
linux編譯ffmpeg過程報錯gcc is unable to create an executable file C compiler test failed.網上找了一圈,關於這個問題的答
【maven】maven的web項目打包報錯:No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK
應用 cga snapshot ace owin span ons sed sse 打包過程中報錯如下: No compiler is provided in this environment. Perhaps you are running on a JRE rather
error:Microsoft Visual C++ 9.0 is required. Get it
安裝模塊報錯安裝,執行如下命令: python install virtualenv報錯如下:error: Microsoft Visual C++ 9.0 is required. Get it from http://aka.ms/vcpython27解決方法:下載 VCForPython27.msi 。
gevent安裝錯誤解決方案:Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools"
Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools 在windows下安裝gevent時錯誤。錯誤支出缺少Microsoft Visual C++ 14.0庫 解決方法是
問題記錄: Microsoft Visual C++ 14.0 is required. --rcssmin、rjsmin、django-compressor
在安裝rcssmin、rjsmin、django-compressor等模組時,一直報如下錯誤: error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://vis
Linux下編譯ffmpeg報錯gcc is unable to create an executable file C compiler test failed.
程式碼報錯資訊: [[email protected] ffmpeg-3.2.2]# ./configure --enable-shared --prefix=/usr/local/ffmpeg gcc is unable to create an executable
Scrapy安裝錯誤: error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build To
轉載自: https://blog.csdn.net/nima1994/article/details/74931621 原文簡練,記得給原文點個贊。寫的挺好的! 我寫的就比較詳細了點~好吧,是瑣碎。比較友好! 我的版本:3.7 64-bit Windows10 所報錯誤: