我正在尝试使用Visual Studio 2017社区版构建OpenCV 3.2。 我正在建设没有CUDA,所有其他选项都保持默认。
构建时出现此错误:
Severity Code Description Project File Line Suppression State
Error RC1103 invalid option, /FIC:/opencv/modules/videostab/src/precomp.hpp opencv_videostab C:\opencv\_build\modules\videostab\RC 1
其他模块也会发生这种情况。
在Cmake阶段,我发出了这个警告: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.
答案 0 :(得分:1)
我也遇到过这个问题并找到了解决方案。 我看到你在OpenCV特定问题板上发布了这个问题。 github问题板上也有一个:
我假设您已经使用过那里发布的解决方案但是为了完整性以及任何关于Stackoverflow的人,这里是解决方案:
快速解决方案是禁用预编译的头文件。这会增加编译时间,但在其他情况下工作正常: