Ask Your Question
0

problem in building opencv 2.4.8 with cuda 5.5

asked 2014-02-18 04:33:01 -0600

Nitesh gravatar image

I want to build opencv 2.4.8 with CUDA 5.5 using Visual Studio 2010.But everytim I try ,I recieve errors like----

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 Error 21 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\gpu\nvcc opencv_gpu Error 23 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\nonfree\nvcc opencv_nonfree Error 24 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\superres\nvcc opencv_superres Error 52 error LNK1104: cannot open file '......\lib\Debug\opencv_core248d.lib' C:\build\modules\gpu\perf4au\LINK gpu_perf4au Error 2 error LNK1104: cannot open file '....\lib\Debug\opencv_core248d.lib' C:\build\modules\imgproc\LINK opencv_imgproc Error 3 error LNK1104: cannot open file '....\lib\Debug\opencv_core248d.lib' C:\build\modules\flann\LINK opencv_flann Error 4 error LNK1104: cannot open file '....\lib\Debug\opencv_core248d.lib' C:\build\modules\video\LINK opencv_video Error 5 error LNK1104: cannot open file '....\lib\Debug\opencv_core248d.lib' C:\build\modules\photo\LINK opencv_photo Error 6 error LNK1104: cannot open file '....\lib\Debug\opencv_core248d.lib' C:\build\modules\ml\LINK opencv_ml Error 7 error LNK1104: cannot open file '....\lib\Debug\opencv_core248d.lib' C:\build\modules\highgui\LINK opencv_highgui Error 8 error LNK1104: cannot open file '....\lib\Debug\opencv_core248d.lib' C:\build\modules\features2d\LINK opencv_features2d Error 9 error LNK1104: cannot open file '....\lib\Debug\opencv_core248d.lib' C:\build\modules\objdetect\LINK opencv_objdetect Error 10 error LNK1104: cannot open file '....\lib\Debug\opencv_core248d.lib' C:\build\modules\calib3d\LINK opencv_calib3d Error 11 error LNK1104: cannot open file '....\lib\Debug\opencv_core248d.lib' C:\build\modules\flann\LINK opencv_test_flann Error 12 error LNK1104: cannot open file '....\lib\Debug\opencv_core248d.lib' C:\build\modules\features2d\LINK opencv_test_features2d Error 13 error LNK1104: cannot open file '....\lib\Debug\opencv_core248d.lib' C:\build\modules\highgui\LINK opencv_test_highgui Error 14 error LNK1104: cannot open file '....\lib\Debug\opencv_core248d.lib' C:\build\modules\imgproc\LINK opencv_test_imgproc Error 15 error LNK1104: cannot open file '....\lib\Debug\opencv_core248d.lib' C:\build\modules\video\LINK opencv_perf_video Error 16 error LNK1104: cannot open file '....\lib\Debug\opencv_core248d.lib' C:\build\modules\ml\LINK opencv_test_ml Error 17 error LNK1104: cannot open file '....\lib\Debug\opencv_core248d.lib' C:\build\modules\legacy\LINK opencv_legacy Error 18 error LNK1104: cannot open file '....\lib\Debug\opencv_core248d.lib' C:\build\modules\ocl\LINK opencv_ocl Error 19 error LNK1104: cannot open file '....\lib\Debug\opencv_core248d.lib' C:\build\modules\core\LINK opencv_test_core Error 20 error LNK1104: cannot open file '....\lib\Debug\opencv_core248d.lib' C:\build\modules\legacy\LINK opencv_test_legacy Error 22 error LNK1104: cannot open file '....\lib\Debug\opencv_core248d.lib' C:\build\modules\photo\LINK opencv_perf_photo Error 25 error LNK1104: cannot open file '....\lib\Debug\opencv_core248d.lib' C:\build\modules ... (more)

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2014-02-18 06:01:49 -0600

updated 2014-02-18 06:08:08 -0600

The error looks weird, I have built OpenCV with CUDA 5.5 serveral times (I used OpenCV 3.0.0-dev version), but have never seen that kind of error. You may try these steps:

  • Config VS so that every VC project can see header and .lib files from CUDA by open any VC project, go to Property Manager, Microsoft.Cpp.Win32.User, choose properties and add C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include path to Include, C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\lib\Win32 path to Library Directories. Save and exit.
  • Create a build folder in root path of opencv (aka D:\opencv\build).
  • Run cmake gui and create VS solution files.
  • Build OpenCV in release build mode.
edit flag offensive delete link more

Comments

Sir, I am following this at present - http://on-demand.gputechconf.com/gtc/2013/webinar/gtc-express-itseez-opencv-webinar.pdf . But it's just not working for me...I tried above steps mentioned by you also...but still it's not working for me...i am totally confused ...Till now I installed opencv using prebuilt libraries ... but with that i can't use cuda.... so i have to install opencv by making our own libraries from source files but in that case my dlls and libs files are also not getting detected along with some other errors...So i am sure that i am missing somethng very obvious but not getting what is that...Please help me..Thank you.

Nitesh gravatar imageNitesh ( 2014-02-19 03:04:09 -0600 )edit

Could you provide some more details about the error you got? I have never got a failed build with CUDA and OpenCV.

tuannhtn gravatar imagetuannhtn ( 2014-02-19 03:46:37 -0600 )edit

it was unable to detect some nvcc files and not even lib files...like-- 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

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

Nitesh gravatar imageNitesh ( 2014-02-19 06:01:22 -0600 )edit

OK, now you should check to see if VS can compile a simple CUDA program first: just open VS, create new project, choose NVIDIA, CUDA 5.5 Runtime project type. Compile and run that simple program. If you can not pass that, press Alt+F7, in the Device part of CUDA C/C++, change Code generation to match your CUDA card (1.0, 1.1 or 2.0, 2.0 is most suitable). Recompile and run. If you can not pass that, then the problem is the CUDA configuration with VS. If you pass then make sure you have a clean build folder for OpenCV (empty the "build" folder) and build in Release mode.

tuannhtn gravatar imagetuannhtn ( 2014-02-19 07:21:05 -0600 )edit

It got run successfully. but still not sure whether the actual problem will get solved...Got to try that once again...I will revert back once again when i will try that. Thanks .

Nitesh gravatar imageNitesh ( 2014-02-19 08:48:27 -0600 )edit

Question Tools

Stats

Asked: 2014-02-18 04:33:01 -0600

Seen: 962 times

Last updated: Feb 18 '14