解决方案-CMake error: error in configuration process, project files may be invalid(Windows&VS可参考)

简介: 解决方案-CMake error: error in configuration process, project files may be invalid(Windows&VS可参考)

解决流程

      1)按Win键+R键弹出运行,输入cmd进入命令行窗口,输入cmake-gui,弹出如图1所示窗口,即表示成功运行CMake了。

图1 CMake GUI

      2)当点击Configure准备生成项目享受源码盛宴时,突然出现一个框,带着一行“CMake error: error in configuration process, project files may be invalid”,此时你的心情肯定糟糕透顶,不要慌,按我说的来不一定百分百解决你的问题,但起码也提供了一种解决的可能。进入VS->工具->获取工具和功能,确保勾选如下几个工具,简单来说就是勾选所有的v141工具集和CMake相关的。

图2 VS扩展工具

图3 CMake工具

图4 VS最新工具集

图5 CMake的VS工具

图5 CMake的VS工具

      3)勾选完毕后,点击下载和安装,等结束后,再进入CMake GUI,此时发现可以顺利Configure和Generate了。点击Configure一定要注意,先选择同你电脑VS一致的generator,比如我是VS15 2017;第二行代表你生成项目是32位还是64位,32位输入Win32,64位输入x64;其他都默认即可。


图10 Configure配置

       4)点击Generate并提示Generate done后,该文件夹下会生成工程文件,进入工程后若想要动态库就生成dll,若想要静态库就生成lib,也可以查看一些源码资料,到这一步说明你的问题也解决了。


图11 工程文件

      如果文章帮助到你了,可以点个赞让我知道,我会很快乐~加油!

相关文章
|
8月前
|
人工智能 机器人 编译器
【C++】Windows端VS code中运行CMake工程(手把手教学)
【C++】Windows端VS code中运行CMake工程(手把手教学)
|
8月前
|
安全 Windows
安装MyEclipse遇到错误提示 Failed to find a Main Class in “C:Windows\Temp\“时的解决方案
安装MyEclipse遇到错误提示 Failed to find a Main Class in “C:Windows\Temp\“时的解决方案
116 1
|
8月前
|
人工智能 机器人 编译器
【C++】Windows端VS code中运行CMake工程(手把手教学)
【C++】Windows端VS code中运行CMake工程(手把手教学)
507 0
|
2月前
|
数据库 数据安全/隐私保护 Windows
Windows远程桌面出现CredSSP加密数据修正问题解决方案
【10月更文挑战第30天】本文介绍了两种解决Windows系统凭据分配问题的方法。方案一是通过组策略编辑器(gpedit.msc)启用“加密数据库修正”并将其保护级别设为“易受攻击”。方案二是通过注册表编辑器(regedit)在指定路径下创建或修改名为“AllowEncryptionOracle”的DWORD值,并将其数值设为2。
1513 3
|
3月前
|
存储 Linux 编译器
cmake的单目录和多目录的使用(Linux和Windows)
本文介绍了在Windows和Linux平台上使用CMake构建单目录和多目录项目的步骤,包括如何配置CMakeLists.txt文件以及如何生成和使用可执行文件、库文件。
107 2
|
3月前
|
资源调度 编译器 Linux
Windows10系统安装Truffle框架,安装失败,提示:error An unexpected error occurred: “https://xxxxx
Windows10系统安装Truffle框架,安装失败,提示:error An unexpected error occurred: “https://xxxxx
120 0
|
5月前
|
PHP Windows
【Azure App Service for Windows】 PHP应用出现500 : The page cannot be displayed because an internal server error has occurred. 错误
【Azure App Service for Windows】 PHP应用出现500 : The page cannot be displayed because an internal server error has occurred. 错误
|
5月前
|
Linux Python Windows
【Azure 环境】Windows中安装Python azure-eventhub-checkpointstoreblob-aio模块时出错 ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory:
【Azure 环境】Windows中安装Python azure-eventhub-checkpointstoreblob-aio模块时出错 ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory:
|
5月前
|
安全 C++ Windows
Windows下C++使用gRPC(Qt和VS,含文件包和使用方法)
Windows下C++使用gRPC(Qt和VS,含文件包和使用方法)
|
7月前
|
网络虚拟化 Windows
Windows 10 Windows1011出现0x80190001错误解决方案! Windows微软账户无法登录问题 Microsoft Store商店用不了
Windows 10 Windows1011出现0x80190001错误解决方案! Windows微软账户无法登录问题 Microsoft Store商店用不了
191 1

热门文章

最新文章