在 VS2015 Update 3 中构建 OpenCV 3.2 时,xtr1common 中出现大量错误

2023-12-25

在 Visual Studio 2015 Update 3 中使用 OpenCV 3.2 和目标 x64(3.2 版本中没有 x86 库)构建简单的 OpenCV 应用程序时,出现以下错误:

1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\xtr1common(100): error C2737: 'std::is_same_v': 'constexpr' object must be initialized
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\xtr1common(100): error C2998: 'const bool std::is_same_v': cannot be a template definition
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\xtr1common(245): error C2737: 'std::is_integral_v': 'constexpr' object must be initialized
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\xtr1common(245): error C2998: 'const bool std::is_integral_v': cannot be a template definition
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\xtr1common(282): error C2737: 'std::is_floating_point_v': 'constexpr' object must be initialized
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\xtr1common(282): error C2998: 'const bool std::is_floating_point_v': cannot be a template definition
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\xtr1common(295): error C2737: 'std::is_arithmetic_v': 'constexpr' object must be initialized
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\xtr1common(295): error C2998: 'const bool std::is_arithmetic_v': cannot be a template definition
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\xstddef(697): error C2737: 'std::is_function_v': 'constexpr' object must be initialized
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\xstddef(697): error C2998: 'const bool std::is_function_v': cannot be a template definition

不知怎的,我不认为这是 OpenCV 的问题,所以我想我在构建过程中遗漏了一些东西或者配置错误。任何应该改变的建议都值得赞赏:)

我关注了以下网站http://opencv-srf.blogspot.com/2013/05/installing-configuring-opencv-with-vs.html http://opencv-srf.blogspot.com/2013/05/installing-configuring-opencv-with-vs.html当谈到如何配置VS的建议时。

添加源代码,尽管我相信这与构建的配置有关,而不是源代码:

#include "opencv2/opencv.hpp"

int main()
{
    return 0;
}

通过 Nuget 添加 OpenCV 3.1 时出现相同的错误,如中所述OpenCV 通过 NuGet 包与 Visual Studio 2015 一起使用,如何配置? https://stackoverflow.com/questions/42317398/opencv-via-nuget-packages-with-visual-studio-2015-how-to-configure/42324201#comment73139150_42324201。有趣的是,它看起来像是在完全不同的情况下出现的类似错误 -Visual Studio 2015:C++ REST API (Casablanca) 在 VS inlcudes/headers 中编译失败 https://stackoverflow.com/questions/38747680/visual-studio-2015-c-rest-api-casablanca-failing-compilation-in-vs-inlcudes通过将 VS2015 从 RC 重新安装到完整社区版本来解决。我正在使用 VS2015 Enterprise Update 3 所以我希望这不是根本原因......


这个问题显然是由VS2015的问题引起的。至少在我修复了 VS2015 安装之后(来自Program and Features在 Windows 中,问题就消失了)

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

在 VS2015 Update 3 中构建 OpenCV 3.2 时,xtr1common 中出现大量错误 的相关文章

随机推荐

  • ViewController 内的 UINavigationController,视图顶部的间隙

    我正在开发一个通用应用程序 并尝试在 iPhone 和 iPad 版本之间共享尽可能多的代码 我需要使用 TabBarController 作为我的根视图控制器 虽然我想在每个选项卡中使用 SplitViewController 但 Spl
  • gitignore 根本不起作用。我无法让它忽略 .DS_Store 和 .gitignore 文件

    I have gitignored DS Store and gitignore文件 但仍然可以在 git status 中看到它们 有人可以向我解释如何确保在检查状态时我试图忽略的文件不会出现吗 git status Untracked
  • Tango Trees 有实际应用吗?

    平衡二叉搜索树 http en wikipedia org wiki Self balancing binary search tree给出一个O log n 保证搜索时间 探戈树 https en wikipedia org wiki T
  • 在Perl中,如何“跳过”某些文本并在剩余部分中进行搜索和替换? [复制]

    这个问题在这里已经有答案了 文本中多次出现pattern 在进行正则表达式查找和替换时 我想跳过文本的某些片段并替换pattern在剩下的部分 例如 在代码中 usr bin env perl use strict use warnings
  • 实时策略游戏如何在 PHP 中运行?

    一些 MMO 实时策略游戏 例如 Travian 或 oGame 是用 PHP 编码的 您能简单解释一下这样的游戏在幕后是如何运作的吗 游戏如何在没有玩家请求的情况下进行实时数据库更新 另外 当运行 Travian 等拥有 1000 名活跃
  • IE 兼容性问题:

    内的

    我有以下 HTML CSS 其中只有一个 span 标签样式为float right里面一个 h2 tag h2 H2 Test span SPAN text span h2 在 Firefox 上一切都运行良好 我怀疑其他好的浏览器 如

  • 带 2 补码的二进制减法

    我需要帮助使用 2 的表示形式进行二进制减法 并为每个数字使用 5 位 1 9 7 有溢出吗 9 01001 2 的补码 10111 和 7 00111 2 的补码 11001 现在我们需要添加 因为我们使用的是 2 的补码 10111 1
  • centos 7安装pymssql时出错

    我在虚拟机 Centos 7 中安装 pymssql 时遇到了这个问题 我安装的python版本是2 7 6 用于安装 pymssql 的命令 pip intall pymssql 错误信息 root dpitstsvr013 magend
  • 有没有办法对 Powershell cmdlet 的结果进行自动换行?

    简单 可能是愚蠢 的问题 我是 Powershell 新手 主要使用它来实例化托管库 因此当我需要使用其中的成员时 我不必编写小应用程序 其中一些库很旧 并且其方法签名又长又痛苦 在使用 new object 实例化后使用 get memb
  • 我可以使用哪些 March/mtune 选项?

    有没有办法让 gcc 输出可用的 march arch 选项 我遇到构建错误 尝试过 march x86 64 我不知道我的选择是什么 我使用的编译器是 gcc 的专有包装器 它似乎不喜欢 march skylake 标志应该是相同的 所以
  • 如何用XMPP实现聊天列表

    我有 Ejabberd 服务器和移动 iOS Android 应用程序 我想构建一个简单的聊天应用程序 有两个屏幕 聊天列表 带有特定聊天消息的屏幕 我对聊天列表的实现有疑问 我用XEP 0313 消息存档管理 https xmpp org
  • 在 Android Studio 中,构建 Android Wear 项目,如何在两个模块中包含相同的文件

    我成功地在移动设备上构建了 Android Wear 表盘和连接的应用程序 问题是我有几个资源和类文件在两个文件中都被引用mobile and wear模块 我构建这个的骨架应用程序还创建了一个 非构建 DigitalWatch模块 我猜我
  • WebDav 请求的 Httphandler

    我正在尝试编写一个 asp net httphandler 来使用 IIS 处理 webdav 请求 我正在扩展 IHttpHandler 接口并实现 ProcessRequest public class clsMyHandler IHt
  • 更改 TabNine 在建议窗口中的优先级

    我在 VSCode 中使用 TabNine 已经有一段时间了 它非常棒 除了当我必须选择函数 其他名称而不是 TabNine 的建议时 My question is Can we change any setting such that a
  • WebAssembly 使用什么引擎?

    在 Chrome 中 JavaScript 运行在 V8 引擎上 但是运行 WebAssembly 代码的引擎是什么 浏览器如何突然能够通过 WebAssembly 提供改进的性能 此 WebAssembly 引擎在浏览器中始终可用 还是最
  • 将字符串保存到文件

    我有一个迭代 在我看来 email protected cdn cgi l email protection i each do i doing things bigtable lt lt result 0 result length 2
  • .well 类中的垂直居中 bootstrap btn

    我有一个链接 我想将其垂直居中 well来自引导框架的类并且正在使用该类btn btn danger在锚标签上 这是下面的图片 我尝试使用vertical align middle 但这似乎不起作用 您可以看到井上的空间甚至不包括顶部和底部
  • 代码隐藏中带有转换器的数据模板

    我正在尝试在代码隐藏中加载 DataTemplate 但是如果我删除转换器 它就可以正常工作 但是一旦我将其放入其中 它就会崩溃 现在 我确实将我的状态设置为我的命名空间 并将对我的转换器的引用放置在 XAML 中 例如
  • 带有调试输出的 X3 解析器段错误 (BOOST_SPIRIT_X3_DEBUG)

    Update 这个问题涉及两个问题 如接受的答案 https stackoverflow com a 43688320 2428220 这两个问题都存在于 Boost Spirit X3 随 Boost 1 64 一起提供的版本中 但在撰写
  • 在 VS2015 Update 3 中构建 OpenCV 3.2 时,xtr1common 中出现大量错误

    在 Visual Studio 2015 Update 3 中使用 OpenCV 3 2 和目标 x64 3 2 版本中没有 x86 库 构建简单的 OpenCV 应用程序时 出现以下错误 1 gt c program files x86