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

news2024/11/17 14:21:06

前言:

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.coloradmin.cn/o/1418057.html

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

相关文章

Windows XP x86 sp3 安装 Python3.4.4

1 下载 Python3.4.4,下载地址,点击红色部分。 Python Release Python 3.4.4 | Python.org 2 一路 Next,将 C:\Python34 和 C:\Python34\Scripts 加入环境变量。 3 python 查看版本,python -m pip list 查看安装的包。 4 其他(打…

关东升老师Python著作推荐(由电子工业出版社出版)

前言:关东升老师简单介绍 一个在IT领域摸爬滚打20多年的老程序员、软件架构师、高级培训讲师、IT作家。熟悉Java、Kotlin、Python、iOS、Android、游戏开发、数据库开发与设计、软件架构设计等多种IT技术。参与设计和开发北京市公交一卡通百亿级大型项目&#xff0c…

OpenAI、斯坦福大学提出Meta-Prompting,有效提升语言模型的性能

为了研究如何提高语言模型的性能,使其更充分有效地输出对于提问的回答,来自斯坦福和 OpenAI 的学者强强联手,通过提出一种名为元提示(meta-prompting)的方法来深入探索。元提示通过让单个语言模型(如 GPT-4…

微信小程序(二十二)获取全局实例

注释很详细,直接上代码 上一篇 新增内容: 1.全局实例的定义位置 2.全局实例中数据的修改方法 源码: app.js App({//数据可以包括在第二级globalData:{userInfo:null,token:1243,userInfo:null},//globalData并不是关键词,数据可以…

TCP_拥塞控制

引言 24年春节马上就要到了,作为开车党,最大的期盼就是顺利回家过年不要堵车。梦想是美好的,但现实是骨感的,拥堵的道路让人苦不堪言。 在网络世界中,类似于堵车的问题也存在,而TCP(Transmissi…

智慧矿山数字孪生三维可视化平台,赋能矿业新型工业化数字化转型

智慧矿山数字孪生三维可视化平台,赋能矿业新型工业化数字化转型。随着科技的不断发展,数字化转型已经成为各行各业发展的必然趋势。矿业作为传统产业,也需要紧跟时代步伐,通过数字化转型实现更加高效、安全和环保的生产方式。智慧…

STM32_JTAG引脚及复用代码

目录 1.JTAG引脚1.1 说明(可以不看)1.2 引脚 2.复用代码3. 手册介绍(可以不看) 总是忘记有些引脚是JTAG复用的,导致偶尔浪费一些时间,记录一下。 1.JTAG引脚 1.1 说明(可以不看) …

修改el-date-picker datetimerange内部样式 或 popper-class不生效

看官网介绍 需要添加一个 popper-class类名去控制 有可能发现 popper-class不生效。 这时我们需要看 样式 是否加了 scoped。这个的作用就是样式隔离了。 所以我们需要在重新写个style在这当前页面下即可,或者在最外层重新写个样式。我这里直接放在了当前页面下。…

muduo网络库剖析——接受新连接Acceptor类

muduo网络库剖析——接受新连接Acceptor类 前情从muduo到my_muduo 概要框架与细节成员函数使用方法 源码结尾 前情 从muduo到my_muduo 作为一个宏大的、功能健全的muduo库,考虑的肯定是众多情况是否可以高效满足;而作为学习者,我们需要抽取…

Hbuilder真机调试

1.找到adbs文件,执行adb.exe文件 2.手机找到开发人员选项(设置-系统和更新-开发人员选项) 打开之后在调试里面打开USB调试,数据线连接电脑 手机会弹窗提示,点击确定 然后就准备运行啦 3.Hbuilder运行 点击运行就可以…

Kotlin快速入门5

Kotlin的继承与重写 kotlin的继承 Kotlin中所有类都继承自Any类,Any类是所有类的超类,对于没有超类型声明的类是默认超类(Any 不是 java.lang.Object): class LearnKotlin // 默认继承自Any Any类默认提供三个函数…

LeetCode力扣题解(随机每日一题)——使数组为空的最少操作次数

目录 题目链接 题目描述 输入输出示例 代码 复杂度分析 题目链接 2870. 使数组为空的最少操作次数 - 力扣(LeetCode) 题目描述 给你一个下标从 0 开始的正整数数组 nums 。 你可以对数组执行以下两种操作 任意次 : 从数组中选择 两个…

Ubuntu的应用

记得看目录哦! 1. root用户1.1 root介绍1.2 hello Python 2. APT2.1 APT原理机制2.2 Ubuntu软件操作的相关命令2.3 更新Ubuntu软件下载地址2.4 安装一下vim2.5 使用vim 3. 远程登录Ubuntu3.1 ssh介绍3.2 原理图3.3 安装ssh3.4 安装net-tools3.5 查看端口号&#xff…

【Web前端实操17】导航栏效果——滑动门

滑动门 定义: 类似于这种: 滑到导航栏的某一项就会出现相应的画面,里面有对应的画面出现。 箭头图标操作和引用: 像一些图标,如果需要的话,可以找字体图标,比如阿里巴巴矢量图标库:iconfont-阿里巴巴矢量图标库 选择一个——>添加至购物车——>下载代码 因…

Abp 从空白WebApplication开始

开发环境:VS2022、.NET6 1、创建项目:BasicAspNetCoreApplication 2、NuGet添加:Volo.Abp.AspNetCore.Mvc和Volo.Abp.Autofac,如下图所示: 3、开始写代码,目录如下图所示: 3.1、添加启动模块Ap…

2023年:个人年度成长与团队协作成就

文章目录 个人职业发展的喜悦团队成就的辉煌公众号CSDN申请了移动安全领域新星创作者获得6月城市之星北京TOP 10获得23年博客之星TOP 41年度总结 知识星球 开拓新领域的决心免费知识大陆付费知识大陆 展望未来福利时间知识星球会员一年知识星球立减88券 在这个充满挑战与机遇的…

【Spark系列1】DAG中Stage和Task的划分全流程

本文字数在7800字左右,预计时间在15分钟 一、整体流程 每个Aciton操作会创建一个JOB,JOB会提交给DAGScheduler,DAGScheduler根据RDD依赖的关系划分为多个Stage,每个Stage又会创建多个TaskSet,每个TaskSet包含多个Tas…

解决 微信退款,本地退款可以,但是测试环境退款失败问题

1.问题描述 微信小程序退款操作,测试环境一直退款失败,但是本地测试退款却没问题 2.原因分析 本地退款可以,但是测试环境不行,说明问题出在测试环境上 经过排查发现是测试环境的微信商户证书是另一个小程序的,不是正在…

【Delphi】系统菜单中增加菜单项

目录 一、问题提出 二、程序截图 ​编辑 ​编辑 三、程序代码: 一、问题提出 我们在开发windows程序的时候,可能会希望在窗体的系统菜单中增加一个菜单项,那么如何实现呢,实际上通过调用windows API是可以实现的,…