Ask Your Question

Problem in building opencv library with Cuda Support.Need quick help.

asked 2014-02-22 05:33:35 -0500

Nitesh gravatar image

updated 2014-02-22 06:12:07 -0500

berak gravatar image

I am trying to build OpenCV library with Cuda support using Cmake and VS 2010 . But everytime the build fails with basically two kind of errors and they are---

  1. Error 1 error : nvcc supports '--relocatable-device-code=true (-rdc=true)', '--device-c (-dc)', and '--device-link (-dlink)' only when targeting sm_20 or higher C:\build\modules\core\nvcc opencv_core

  2. Error 2 error LNK1104: cannot open file '....\lib\Debug\opencv_core248d.lib'

I have verified that Cuda is installed properly by running deviceQuery application through Command Prompt and got Result=Pass . So i am sure that Cuda got installed properly . I am not sure of configuration of Visual Studio With Cuda though. But i guess if Cuda is installed properly then Opencv library should get build successfully.And yes Opencv library is getting built successfully without Cuda support so I am damn sure that it is something related to Cuda or Cuda configuration.

Please help me . I have been trying to solve it from past 1 week but not got it solved. Tried with many suggestions by peoples but still the problem persists.

Thank you.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2014-04-07 05:03:54 -0500

AlanMM gravatar image

I had the same problem that you working on VS 2010. From what I read the problem is the version of VS, so I downloaded VS 2012 and make the changes from here and everything compiled right.


edit flag offensive delete link more

Question Tools


Asked: 2014-02-22 05:33:35 -0500

Seen: 361 times

Last updated: Apr 07 '14