编译Opencv3.3 版本遇到的Cuda版本变更导致:CUDA_nppicom_LIBRARY (ADVANCED)链接找不到的问题根本解法:

前言:

Opencv 开源库的使用是必须的,但是,开源项目的特性,造成,版本的依赖性比较复杂,
尤其是针对某一款老硬件的SDK,往往随着某个开源库的使用,导致,无法编译的问题,
本文,就是在一个硬件的SDK中用到了opencv3.3的版本,在笔者目前的VS2019,CUDA11版本下编译的问题和解决。


结论:


1 出现编译错误不要慌,这是开源项目的正常正常现象
2 搞清楚现在的SDK是那年出来的
3 搞清楚哪个库出问题,去找一下这个库的原始网站或者GitHub,看一下这些年都有哪些更新,尤其是接口API是不是变了
4 网上找找有没有哪个兄弟也遇到了,并解决了
5 找不到,不要慌,把编译或者链接出错的库拿出来,在源文件夹的编译配置文件里面搜一下
6 学一点CMAKE的知识,看看是这个库的问题还是这个库依赖的库问题,一半Cmake比较准确,就是这个库问题
7 确认这个库的版本是不是和你的SDK要求的版本一致
8 确认源文件里面有没有这个库
9 找到这个缺失的库,或者,去掉这个库的编译连接配置,或者用-D 告诉编译器这个库你就别管了,都行,反正能让编译器保持继续工作就可以!


 问题:

 CUDA_nppicom_LIBRARY (ADVANCED)

错误信息如下:

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
CUDA_nppicom_LIBRARY (ADVANCED)
linked by target "opencv_cudev" in directory D:/opencv331/opencv/sources/modules/cudev
linked by target "opencv_cudev" in directory D:/opencv331/opencv/sources/modules/cudev
linked by target "opencv_test_cudev" in directory D:/opencv331/opencv/sources/modules/cudev/test
linked by target "opencv_core" in directory D:/opencv331/opencv/sources/modules/core
linked by target "opencv_core" in directory D:/opencv331/opencv/sources/modules/core
linked by target "opencv_test_core" in directory D:/opencv331/opencv/sources/modules/core
linked by target "opencv_perf_core" in directory D:/opencv331/opencv/sources/modules/core
linked by target "opencv_flann" in directory D:/opencv331/opencv/sources/modules/flann
linked by target "opencv_flann" in directory D:/opencv331/opencv/sources/modules/flann
linked by target "opencv_test_flann" in directory D:/opencv331/opencv/sources/modules/flann
linked by target "opencv_perf_imgproc" in directory D:/opencv331/opencv/sources/modules/imgproc
linked by target "opencv_imgproc" in directory D:/opencv331/opencv/sources/modules/imgproc
linked by target "opencv_imgproc" in directory D:/opencv331/opencv/sources/modules/imgproc
linked by target "opencv_test_imgproc" in directory D:/opencv331/opencv/sources/modules/imgproc
linked by target "opencv_ml" in directory D:/opencv331/opencv/sources/modules/ml
linked by target "opencv_ml" in directory D:/opencv331/opencv/sources/modules/ml
linked by target "opencv_test_ml" in directory D:/opencv331/opencv/sources/modules/ml
linked by target "opencv_objdetect" in directory D:/opencv331/opencv/sources/modules/objdetect
linked by target "opencv_objdetect" in directory D:/opencv331/opencv/sources/modules/objdetect
linked by target "opencv_test_objdetect" in directory D:/opencv331/opencv/sources/modules/objdetect
linked by target "opencv_perf_objdetect" in directory D:/opencv331/opencv/sources/modules/objdetect
linked by target "opencv_photo" in directory D:/opencv331/opencv/sources/modules/photo
linked by target "opencv_photo" in directory D:/opencv331/opencv/sources/modules/photo
linked by target "opencv_test_photo" in directory D:/opencv331/opencv/sources/modules/photo
linked by target "opencv_perf_photo" in directory D:/opencv331/opencv/sources/modules/photo
linked by target "opencv_video" in directory D:/opencv331/opencv/sources/modules/video
linked by target "opencv_video" in directory D:/opencv331/opencv/sources/modules/video
linked by target "opencv_test_video" in directory D:/opencv331/opencv/sources/modules/video
linked by target "opencv_perf_video" in directory D:/opencv331/opencv/sources/modules/video
linked by target "opencv_dnn" in directory D:/opencv331/opencv/sources/modules/dnn
linked by target "opencv_dnn" in directory D:/opencv331/opencv/sources/modules/dnn
linked by target "opencv_test_dnn" in directory D:/opencv331/opencv/sources/modules/dnn
linked by target "opencv_perf_dnn" in directory D:/opencv331/opencv/sources/modules/dnn
linked by target "opencv_imgcodecs" in directory D:/opencv331/opencv/sources/modules/imgcodecs
linked by target "opencv_imgcodecs" in directory D:/opencv331/opencv/sources/modules/imgcodecs
linked by target "opencv_test_imgcodecs" in directory D:/opencv331/opencv/sources/modules/imgcodecs
linked by target "opencv_perf_imgcodecs" in directory D:/opencv331/opencv/sources/modules/imgcodecs
linked by target "opencv_shape" in directory D:/opencv331/opencv/sources/modules/shape
linked by target "opencv_shape" in directory D:/opencv331/opencv/sources/modules/shape
linked by target "opencv_test_shape" in directory D:/opencv331/opencv/sources/modules/shape
linked by target "opencv_videoio" in directory D:/opencv331/opencv/sources/modules/videoio
linked by target "opencv_videoio" in directory D:/opencv331/opencv/sources/modules/videoio
linked by target "opencv_test_videoio" in directory D:/opencv331/opencv/sources/modules/videoio
linked by target "opencv_perf_videoio" in directory D:/opencv331/opencv/sources/modules/videoio
linked by target "opencv_highgui" in directory D:/opencv331/opencv/sources/modules/highgui
linked by target "opencv_highgui" in directory D:/opencv331/opencv/sources/modules/highgui
linked by target "opencv_test_highgui" in directory D:/opencv331/opencv/sources/modules/highgui
linked by target "opencv_superres" in directory D:/opencv331/opencv/sources/modules/superres
linked by target "opencv_superres" in directory D:/opencv331/opencv/sources/modules/superres
linked by target "opencv_test_superres" in directory D:/opencv331/opencv/sources/modules/superres
linked by target "opencv_perf_superres" in directory D:/opencv331/opencv/sources/modules/superres
linked by target "opencv_ts" in directory D:/opencv331/opencv/sources/modules/ts
linked by target "opencv_ts" in directory D:/opencv331/opencv/sources/modules/ts
linked by target "opencv_features2d" in directory D:/opencv331/opencv/sources/modules/features2d
linked by target "opencv_features2d" in directory D:/opencv331/opencv/sources/modules/features2d
linked by target "opencv_test_features2d" in directory D:/opencv331/opencv/sources/modules/features2d
linked by target "opencv_perf_features2d" in directory D:/opencv331/opencv/sources/modules/features2d
linked by target "opencv_calib3d" in directory D:/opencv331/opencv/sources/modules/calib3d
linked by target "opencv_calib3d" in directory D:/opencv331/opencv/sources/modules/calib3d
linked by target "opencv_test_calib3d" in directory D:/opencv331/opencv/sources/modules/calib3d
linked by target "opencv_perf_calib3d" in directory D:/opencv331/opencv/sources/modules/calib3d
linked by target "opencv_stitching" in directory D:/opencv331/opencv/sources/modules/stitching
linked by target "opencv_stitching" in directory D:/opencv331/opencv/sources/modules/stitching
linked by target "opencv_test_stitching" in directory D:/opencv331/opencv/sources/modules/stitching
linked by target "opencv_perf_stitching" in directory D:/opencv331/opencv/sources/modules/stitching
linked by target "opencv_videostab" in directory D:/opencv331/opencv/sources/modules/videostab
linked by target "opencv_videostab" in directory D:/opencv331/opencv/sources/modules/videostab
linked by target "opencv_test_videostab" in directory D:/opencv331/opencv/sources/modules/videostab
linked by target "opencv_traincascade" in directory D:/opencv331/opencv/sources/apps/traincascade
linked by target "opencv_createsamples" in directory D:/opencv331/opencv/sources/apps/createsamples
linked by target "opencv_annotation" in directory D:/opencv331/opencv/sources/apps/annotation
linked by target "opencv_visualisation" in directory D:/opencv331/opencv/sources/apps/visualisation
linked by target "opencv_interactive-calibration" in directory D:/opencv331/opencv/sources/apps/interactive-calibration
linked by target "opencv_version" in directory D:/opencv331/opencv/sources/apps/version

Generating done


 解决办法: 

1 问题分析

原因解析:

cuda9以上不再支持2.0架构,笔者系统的CUDA的版本是11.0,自然是没有这个nppicom的库的,所以,我们需求在配置中拿掉这个选项:

2 找到编译配置文件:

 D:\opencv331\opencv\sources\cmake

 【案,可以在source目录下,直接搜索报错的库名称,CUDA_nppicom_LIBRARY,也能找到makefile对应的修改的地方

CUDA的配置在,

3 找到错误的库应用:

在文件,FindCUDA.cmake,我们做如下修改:

 # Cuda not support nppicom from version 9 so just add a condition find_cuda_helper_libs(nppicom)if(CUDA_VERSION VERSION_LESS "11.0")find_cuda_helper_libs(nppicom)endif()find_cuda_helper_libs(nppidei)find_cuda_helper_libs(nppif)find_cuda_helper_libs(nppig)find_cuda_helper_libs(nppim)find_cuda_helper_libs(nppist)find_cuda_helper_libs(nppisu)find_cuda_helper_libs(nppitc)find_cuda_helper_libs(npps)if(CUDA_VERSION VERSION_LESS "11.0")set(CUDA_nppi_LIBRARY "${CUDA_nppial_LIBRARY};${CUDA_nppicc_LIBRARY};${CUDA_nppicom_LIBARY};${CUDA_nppidei_LIBRARY};${CUDA_nppif_LIBRARY};${CUDA_nppig_LIBRARY};${CUDA_nppim_LIBRARY};${CUDA_nppist_LIBRARY};${CUDA_nppisu_LIBRARY};${CUDA_nppitc_LIBRARY}")else()set(CUDA_nppi_LIBRARY "${CUDA_nppial_LIBRARY};${CUDA_nppicc_LIBRARY};${CUDA_nppidei_LIBRARY};${CUDA_nppif_LIBRARY};${CUDA_nppig_LIBRARY};${CUDA_nppim_LIBRARY};${CUDA_nppist_LIBRARY};${CUDA_nppisu_LIBRARY};${CUDA_nppitc_LIBRARY}")endif()

注意,

箭头处,都是笔者的修改

4 重新编译:

Configuring done

Generating done

就可以了


Ubuntu18.04+CUDA11.2+opencv4.3.0:CUDA_nppicom_LIBRARY (ADVANCED)报错解决_cuda_npps_library (advanced)-CSDN博客

OpenCV3.3+CUDA9.0+Cmake3.9 环境搭建_opencv make失败cuda compire-CSDN博客

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/653362.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

(bean的创建图)学习Spring的第十天(很重要)

大致框架按如下 第一次细分 bean对象还未创建 操作第一个map 引入BeanFactoryPostProcessor , 即Bean工厂后处理器 , 为Spring很重要的扩展点 BeanFactoryPostProcessor内部的方法 可以对BeaDefinition进行修改 , 也可进行BeanDefinition的注册 ( 原有在xml文件配置的bean…

从零学习Linux操作系统 第二十部分 mariadb数据库的管理

一、对于数据库的基本介绍 1.什么是数据库 数据库就是个高级的表格软件 2.常见数据库 Mysql Oracle mongodb db2 sqlite sqlserver … 3.Mysql (SUN -----> Oracle) 4.mariadb (Mysql的一种) 数据库中的常用名词 1.字段 :表格中的表头 2.表 &…

Day01_变量和数据类型(注释,关键字,标识符,数据类型,字面量,变量,常量,进制,计算机存储单位,Java的基本数据类型的存储范围,计算机如何表示数据)

文章目录 JavaSE_Day01 变量和数据类型学习目标1.1 注释(*comment*)(掌握)1.2 关键字(*keyword*)(掌握)1.3 标识符( identifier)(掌握)1.3.1 标识符的命名规则…

构造器模式

构造器模式 意图 将一个复杂对象的构建和表示分离,使得相同的构建能创建不同的表示。 解释 案例:想象一个角色扮演游戏的特征生成器。最简单的选择是让计算机为你创建角色。如果你想手动选择特征的细节像职业、性别、头发的颜色等。特征的产生是一个循…

js实现动漫拼图1.0版

文章目录 1 实现效果视频2 功能实现思路3代码实现 1 实现效果视频 拼图1.0 2 功能实现思路 布局忽略(小白学前端,不献丑了) 左侧拼图格 左侧4*4的拼图小格子 利用表格实现,规划好td的大小,给每个格子加上背景图片&…

Flink问题解决及性能调优-【Flink不同并行度引起sink2es报错问题】

最近需求,仅想提高sink2es的qps,所以仅调节了sink2es的并行度,但在调节不同算子并行度时遇到一些问题,找出问题的根本原因解决问题,并分析整理。 实例代码 --SET table.exec.state.ttl86400s; --24 hour,默认: 0 ms …

MySQL查询—联合查询、子查询

关于表格的创建,请看上一篇文章——MySQL查询—连接查询 1、联合查询:把多次查询的结果合并,形成一共新的查询集。 UNION,UNION ALL 语法: SELECT 字段列表 FROM 表A..&#…

qt-C++笔记之使用信号和槽实现跨类成员变量同步响应

qt-C笔记之使用信号和槽实现跨类成员变量同步响应 —— 杭州 2024-01-24 code review! 文章目录 qt-C笔记之使用信号和槽实现跨类成员变量同步响应1.运行2.main.cpp3.test.pro4.编译 1.运行 2.main.cpp 代码 #include <QCoreApplication> #include <QObject> #…

Linux下Docker搭建部署Typecho博客【详细版】

Linux下Docker搭建部署Typecho博客【详细版】 一、环境准备1.1.准备阿里云服务器【新用户免费使用三个月】1.2.准备远程工具【FinalShell】1.3.系统信息1.4.安装所需软件包1.5.设置docker镜像源1.6.更新yum软件包索引1.7.确认停用selinux 二、安装Docker2.1.安装Docker-Ce2.2.查…

【RTP】webrtc 学习3: webrtc对h264的rtp解包

rtp_rtcp\source\video_rtp_depacketizer_h264.cc【RTP】webrtc 学习2: webrtc对h264的rtp打包 中分析了打包过程的代码,这样再来看解析过程的源码就容易多了:本代码主要基于m79,m98类似。这里注明了jitterbuffer 会再次 做 解析stap-a 变为NAL units解析ParseFuaNalu 第一…

ACL、VLAN、NAT笔记

一、ACL ---访问控制列表 1.ACL的作用 1&#xff0c;访问控制&#xff1a;在路由器流量流入或流出的接口上&#xff0c;匹配流量&#xff0c;然后 执行设定好的动作。 ---- permit 允许 , deny 拒绝 2&#xff0c;抓取感兴趣流&#xff1a;ACL可以和其他服务结合使用。ACL只…

MyBatis 如何整合 Druid 连接池?

Mybatis 如何整合 Druid 数据连接池呢&#xff1f;首先打开创建的 Maven 工程&#xff0c;找到 pom.xml 文件&#xff0c;添加 Druid 依赖。 <!--druid连接池--> <dependency><groupId>com.alibaba</groupId><artifactId>druid</artifactId&…

【C语言】数组的应用:三子棋游戏

由于代码较长&#xff0c;为了增加可读性&#xff0c;我们把代码分别写到game.h&#xff0c;game.c&#xff0c;test.c&#xff0c;里面&#xff0c;其中game.h用来声明函数&#xff0c;实现函数功能的代码在game.c&#xff0c;测试游戏的代码在test.c 为了方便后续的更改&…

ThreadLocal学习笔记

ThreadLocal类图 ThreadLocal/InheritableThreadLocal/ \TransmittableThreadLocal(阿里巴巴) TransmissibleThreadLocal(阿里巴巴)ThreadLocal 这是Thread类的局部变量&#xff0c;每个线程私有。 它主要用于解决多线程中的数据共享问题&#xff0c;保…

k8s 版本发布与回滚

一、实验环境准备&#xff1a; kubectl get pods -o wide kubectl get nodes -o wide kubectl get svc 准备两个nginx镜像&#xff0c;版本号一个是V3&#xff0c;一个是V4 二、准备一个nginx.yaml文件 apiVersion: apps/v1 kind: Deployment metadata:name: nginx-deploylab…

翻译: GPT-4 Vision静态图表转换为动态数据可视化 升级Streamlit 三

GPT-4 Vision 系列: 翻译: GPT-4 with Vision 升级 Streamlit 应用程序的 7 种方式一翻译: GPT-4 with Vision 升级 Streamlit 应用程序的 7 种方式二 1. 将任何静态图表转换为动态数据可视化 ChatGPT Vision 不仅可以将涂鸦变成功能齐全的 Streamlit 应用程序&#xff0c;还…

SpringBoot整合nacos的入门Demo

Nacos介绍 Nacos /nɑ:kəʊs/ 是 Dynamic Naming and Configuration Service的首字母简称&#xff0c;一个更易于构建云原生应用的动态服务发现、配置管理和服务管理平台。 Nacos 致力于帮助您发现、配置和管理微服务。Nacos 提供了一组简单易用的特性集&#xff0c;帮助您快速…

操作系统(6)----线程相关

目录 1.线程与进程的关系 2.线程的属性 3.线程的实现方式 用户级线程 内核级线程 多线程模型 一对一模型: 多对一模型&#xff1a; 多对多模型&#xff1a; 4.线程的状态和转换 5.线程的组织与控制 1.线程与进程的关系 可以把线程理解为“轻量级进程”。线程是一个…

大创项目推荐 题目:基于卷积神经网络的手写字符识别 - 深度学习

文章目录 0 前言1 简介2 LeNet-5 模型的介绍2.1 结构解析2.2 C1层2.3 S2层S2层和C3层连接 2.4 F6与C5层 3 写数字识别算法模型的构建3.1 输入层设计3.2 激活函数的选取3.3 卷积层设计3.4 降采样层3.5 输出层设计 4 网络模型的总体结构5 部分实现代码6 在线手写识别7 最后 0 前言…

【Spring实战】31 Spring Boot3 集成 Gateway 微服务网关

文章目录 1. 定义2. 功能3. 示例代码1) 创建一个业务服务2&#xff09;创建一个网关服务3&#xff09;启动服务4&#xff09;验证 4. 代码参考结语 1. 定义 Spring Cloud Gateway 是一个基于 Spring Framework 的开源网关服务&#xff0c;用于构建微服务架构中的 API 网关。它…