OpenCV330+CMake+VS2015: Error in configuration process,project files may invalid

xu_2290 2018-06-26 05:54:24
目的:使用CMake获得OpenCV x86版
安装网上许多大神的步骤做了,但是……开头就错……
例如如下大神:https://blog.csdn.net/zhangping1987/article/details/78051233、https://blog.csdn.net/k87974/article/details/76732222、https://blog.csdn.net/whu_zs/article/details/78842135、https://blog.csdn.net/xzzppp/article/details/54926117等等
截图:



》》版本:OpenCV3.3.0+CMake3.11.3+VS2015
》》注意:仅仅使用CMake构建极其简单的程序似乎都会出错,不知道哪个环节出问题……

以下为Configure后的提示:
CMake Deprecation Warning at CMakeLists.txt:81 (cmake_policy):
The OLD behavior for policy CMP0020 will be removed from a future version
of CMake.

The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.


CMake Deprecation Warning at CMakeLists.txt:85 (cmake_policy):
The OLD behavior for policy CMP0022 will be removed from a future version
of CMake.

The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.


CMake Deprecation Warning at CMakeLists.txt:94 (cmake_policy):
The OLD behavior for policy CMP0026 will be removed from a future version
of CMake.

The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.


CMake Deprecation Warning at CMakeLists.txt:102 (cmake_policy):
The OLD behavior for policy CMP0046 will be removed from a future version
of CMake.

The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.


CMake Error at CMakeLists.txt:127 (project):
Failed to run MSBuild command:

C:/Program Files (x86)/MSBuild/14.0/bin/MSBuild.exe

to get the value of VCTargetsPath:

Microsoft (R) 生成引擎版本 14.0.25420.1

版权所有(C) Microsoft Corporation。保留所有权利。



生成启动时间为 2018/6/26 17:38:36。

项目中不存在 BeforeTargets 特性中的“C:\Program Files (x86)\MSBuild\14.0\Microsoft.Common.targets\ImportAfter\Xamarin.Common.targets (34,37)”位置列出的目标“_ConvertPdbFiles”,将忽略该目标。

项目中不存在 AfterTargets 特性中的“C:\Program Files (x86)\MSBuild\14.0\Microsoft.Common.targets\ImportAfter\Xamarin.Common.targets (34,70)”位置列出的目标“_CollectPdbFiles”,将忽略该目标。

项目中不存在 BeforeTargets 特性中的“C:\Program Files (x86)\MSBuild\14.0\Microsoft.Common.targets\ImportAfter\Xamarin.Common.targets (41,38)”位置列出的目标“_CollectMdbFiles”,将忽略该目标。

项目中不存在 AfterTargets 特性中的“C:\Program Files (x86)\MSBuild\14.0\Microsoft.Common.targets\ImportAfter\Xamarin.Common.targets (41,71)”位置列出的目标“_CopyMdbFiles”,将忽略该目标。

节点 1 上的项目“D:\opencv330\build\CMakeFiles\3.11.3\VCTargetsPath.vcxproj”(默认目标)。

InitializeBuildStatus:

正在创建“x64\Debug\VCTargetsPath.tlog\unsuccessfulbuild”,因为已指定“AlwaysCreate”。

FinalizeBuildStatus:

正在删除文件“x64\Debug\VCTargetsPath.tlog\unsuccessfulbuild”。

正在对“x64\Debug\VCTargetsPath.tlog\VCTargetsPath.lastbuildstate”执行 Touch 任务。

已完成生成项目“D:\opencv330\build\CMakeFiles\3.11.3\VCTargetsPath.vcxproj”(默认目标)的操作。



已成功生成。

0 个警告

0 个错误



已用时间 00:00:00.27





Configuring incomplete, errors occurred!
See also "D:/opencv330/build/CMakeFiles/CMakeOutput.log".
...全文
1167 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
robertbo 2018-06-27
  • 打赏
  • 举报
回复
CMake版本太高了也不行,我用的3.4.3版本可以编译,没啥特别的要求,有一些库处理的时候需要在线下载,所以要能联网

3,882

社区成员

发帖
与我相关
我的任务
社区描述
C/C++ 其它技术问题
社区管理员
  • 其它技术问题社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧