先说我的环境
vs2017 win10
.\vcpkg.exe --version
Vcpkg package management program version 2021-12-09
问题1:
vcpkg was unable to detect the active compiler's information.
See above for the CMake failure output
解决方法:
1、打开vcpkg/scripts/buildsystems/vcpkg.cmake这个文件在第24行添加两行代码
SET (CMAKE_C_COMPILER_WORKS 1)
SET (CMAKE_CXX_COMPILER_WORKS 1)
!!注意!!很多复制上去发现不好使,要注意你的文件中的“SET”是大写还是小写!!!要和你的文件中的set保持一致,比如我的就是小写的set;
2、有些人到这里可能就好使了。如果和我一样还不能用的话,还是报同样的错误的话;
!!注意!!,你的路径中是否有中文。有的话,去掉!
问题2:
Warning: The following VS instances are excluded because the English language pa
ck is unavailable.
这个问题就是vs中没有英文语言包。
解决办法:
打开vs--工具---获取功能和功能(如果打不开,参考下面的链接)---语言包--选中英语---点击右下角修改。
在vs2017中找不到Visual Studio安装程序为什么?-微软技术-CSDN问答
https://ask.csdn.net/questions/7480003
vckpg中文文档
https://gitcode.net/mirrors/microsoft/vcpkg/-/blob/master/README_zh_CN.md