cmake cannot find -lopencv_dep_cudart
来源:互联网 发布:windows终端机 编辑:程序博客网 时间:2024/06/08 19:18
最近在使用v4l2获取视频。在编译的过程中,遇到了下面的问题,CMakeLists代码和报错程序截图如下:
# cmake needs this linecmake_minimum_required(VERSION 2.8.4)# Define project nameproject(capturev4l2)# Find OpenCVfind_package(OpenCV REQUIRED)# Add OpenCV headers location to your include pathsinclude_directories(${OpenCV_INCLUDE_DIRS})# Declare the executable target built from your sourcesset(SOURCE capturev4l2.c)add_executable(capturev4l2 ${SOURCE})# Link your application with OpenCV librariestarget_link_libraries(capturev4l2 ${OpenCV_LIBS})
发现上面的错误提示有关于cuda,cmake cannot find -lopencv_dep_cudart。添加了cuda的CMakeLists依赖之后代码如下
# cmake needs this linecmake_minimum_required(VERSION 2.8.4)# Define project nameproject(capturev4l2)# Find OpenCVfind_package(OpenCV REQUIRED)find_package(CUDA)# Add OpenCV headers and cuda header location to your include pathsinclude_directories(${OpenCV_INCLUDE_DIRS})include_directories("/usr/local/cuda-8.0/include")# Declare the executable target built from your sourcesset(SOURCE capturev4l2.c)add_executable(capturev4l2 ${SOURCE})# Link your application with OpenCV librariestarget_link_libraries(capturev4l2 ${OpenCV_LIBS})
编译
$cmake ..$make
最后在https://devtalk.nvidia.com/default/topic/970325/jetson-tx1/cmake-cannot-find-lopencv_dep_cudart/发现有人遇到了同样的问题。在CMakeLists加入下面这行代码
set(CUDA_USE_STATIC_CUDA_RUNTIME OFF)
编译成功。
2 0
- cmake cannot find -lopencv_dep_cudart
- cmake cannot find -lopencv_dep_cudart
- cannot find -lopencv_dep_cudart
- 解决cannot find -lopencv_dep_cudart问题
- /usr/bin/ld: cannot find -lopencv_dep_cudart解决办法
- caffe2 ubuntu16.04 安装错误 cannot find -lopencv_dep_cudart
- clion下调试caffe出现提示cannot find -lopencv_dep_cudart
- 关于CMake 报 -lopencv_dep_cudart 错
- 【Linux】【Opencv】某些情况make编译出现/usr/bin/ld: cannot find -lopencv_dep_cudart
- cmake cannot find eigen3 in ubuntu
- 编译PCL的时候,cmake的时候出现cannot find Boost libraries
- opencv使用cmake链接库函数出现usr/bin/ld: cannot find -lopencv_终极解决方案
- 使用CMAKE链接外部的动态库时找不到库文件解决办法(/usr/bin/ld: cannot find lxxx)
- CMake can't find Curses
- Error:Failed to find CMake.
- Cannot find FacesContext
- cannot find -lncursesw 错误
- cannot find -lqte 解决方法
- 24-TCP 协议(拥塞控制)
- centos中安装g++
- mybatis中#{}和${}的区别
- 敏捷教练培训日记
- 代码 RNN
- cmake cannot find -lopencv_dep_cudart
- sqoop从greenplum到数据到hive中
- Input调用流程(好文)
- CentOS更改yum源与更新系统
- Java基础之泛型
- HDU 1063Exponentiation
- 用MPLAB IDE编程时,软件总是弹出一个窗口提示: “the extended cpu mode configuration bit is enabled,but the program that
- 杂记
- NMOS开关电路测试