使用OpenCv运行CUDA时出现错误 [英] Errors when running CUDA with OpenCv

查看:77
本文介绍了使用OpenCv运行CUDA时出现错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试运行CUDA .cu程序以及其中的OpenCv代码.我尝试单独运行示例CUDA .cu,它与OpenCV正常运行.

但是当我一起运行时,会出现这些错误.

I am trying to run a CUDA .cu program along with OpenCv code in it. I tried running the sample CUDA .cu alone and it works just fine and the same with OpenCV.

But when i run both together i get these errors.

Error 2 error MSB3721: The command ""C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.2\bin\nvcc.exe" -gencode=arch=compute_10,code=\"sm_10,compute_10\" --use-local-env --cl-version 2010 -ccbin "c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\x86_amd64" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.2\include" -G --keep-dir "x64\Debug" -maxrregcount=0 --machine 64 --compile -g -Xcompiler "/EHsc /nologo /Od /Zi /MTd " -o "x64\Debug\new_stitching_threads.cu.obj" "C:\Users\UVSS\Desktop\new_stitching_CUDA\new_stitching\new_stitching_threads.cu"" exited with code 2. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\BuildCustomizations\CUDA 4.2.targets 361


我已经正确添加了所有库和包含目录.我该如何解决呢?


i have added all the library and the include directories correctly. How do i solve this?

推荐答案

您什么都没有运行,正在尝试将目标文件链接到可执行文件中.但是,您缺少一些内容,因此您需要将两个项目合并为一个,或者将缺少的库的路径添加到项目中.如果不确定在哪里查看,请在错误消息中查看缺失项的名称.
You are not running anything, you are trying to link the object files into an executable. However you have some pieces missing, so you need to either combine the two projects into one, or add the paths of the missing library(s) to your project. If you are not sure where to look then see the names of the missing items in the error messages.


这篇关于使用OpenCv运行CUDA时出现错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆