【31】报错fatal error: no#include ,nop/serializer.h:没有那个文件或目录

报错提示:
找不到serializer.h文件
在这里插入图片描述
或是其他cmake找不到文件

在这里插入图片描述
都可参考下面的方法

解决方法:

在发行版中,您可能会找到适用于 Windows 的预构建库,可用于任一集成方法。见 发布

CMake

可链接的目标是:

  • depthai::core - 核心库,内部不使用 opencv
  • depthai::opencv - Core + 支持 opencv 相关的辅助函数(需要 OpenCV4 )
使用 find_package

find_packagetarget_link_libraries 添加到您的项目中

find_package(depthai CONFIG REQUIRED)
...
target_link_libraries([my-app] PRIVATE depthai::opencv)

并将 CMake 指向目录:

-D'depthai_DIR=<path>/depthai-core-v{version}-win64/lib/cmake/depthai'

or

-D'depthai_DIR=<path>/usr/local/lib/cmake/depthai'

如果库安装到 Linux 上的默认搜索路径(即使用 deb 安装),则无需指定 depthai_DIR,因为 CMake 会自动找到它。

非 CMake 集成(Visual Studio, Xcode, CodeBlocks, …)

在你的非CMake项目(新的Visual Studio项目,…)中

  1. 设置需要的库目录:
    • <path>/depthai-core-v{version}-win64/lib (用于链接到 depthai-coredepthai-opencv)
    • <path>/depthai-core-v{version}-win64/bin (用于 .dll 的)
  2. And include directories
    • <path>/depthai-core-v{version}-win64/include (library headers)
    • <path>/depthai-core-v{version}-win64/include/depthai-shared/3rdparty (shared 3rdparty headers)
    • <path>/depthai-core-v{version}-win64/lib/cmake/depthai/dependencies/include (dependency headers)

ℹ️ 线程库可能需要显式链接。

小技巧:遇到报错先在csdn内搜索,无法找到解决方法时可在我们群内提问!

其他常见报错:
请查看


OAK中国
| OpenCV AI Kit在中国区的官方代理商和技术服务商
| 追踪AI技术和产品新动态

戳「+关注」获取最新资讯↗↗

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值