CMake: CUDA libraries not found when compiling OpenCV

后端 未结 3 1052
逝去的感伤
逝去的感伤 2021-02-08 14:17

I am compiling OpenCV 3.0.0 with CUDA support on Windows, using CMAKE. When I click \"configure\", errors occur as following:

CMake Error: The following variable         


        
3条回答
  •  悲哀的现实
    2021-02-08 14:47

    it is really related to version!!! if you want to compile with Cuda, when you cmake opencv2413, you will notice the makefile will try to find some third-party libs for supporting more functions:

    CUDA_TOOLKIT_ROOT_DIR C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v9.0

    from that, I know I ever installed CUDA v9.0, but I still got this not found opencv_dep_CUDA_nppi_LIBRARY error, so I look for it in C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\lib\x64, I did can not get it whose name is nppi.lib,so just for a test, i create a empty file and name it nppi.lib,as I guess, I worked, but in fact, it was not enough, the test can not help compiling opencv,morever, I found I had CUDA v8, and suprisly, I got the lib nppi.lib in C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\lib\x64; so I change my environment path,

    CUDA_TOOLKIT_ROOT_DIR C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0 then I reconfigured it. it worked!!

提交回复
热议问题