Error during build, OpenCL kernels core

Hello evenryone,

I’m trying to use the OpenCV with cuda, but i can manage to build the OpenCV through CMake, but the Build processo finishes with many erros like:

D:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(248,5): warning MSB8065: Custom build for item E:\OpenCV\builds\CMakeFiles\73fe723e92479b05f06abfab27cdceae\opencl_kernels_core.cpp.rule succeeded, but specified output e:\opencv\builds\modules\core\opencl_kernels_core.cpp has not been created. This may cause incremental build to work incorrectly.
C:\OpenCV\sources\opencv-4.7.0\modules\core\src\arithm.cpp(51,10): fatal error C1083: Cannot open include file: ‘opencl_kernels_core.hpp’: No such file or directory

and many other with ‘opencl_kernels_*.hpp’

But also other errors like:

Done building project opencv_core.vcxproj – FAILED.
LINK : fatal error LNK1181: cannot open input file ‘…..\lib\Release\opencv_core470.lib’

Done building project opencv_hfs.vcxproj – FAILED.
Done building project opencv_img_hash.vcxproj – FAILED.
Done building project opencv_plot.vcxproj – FAILED.
Done building project opencv_quality.vcxproj – FAILED.
Done building project opencv_cudafilters.vcxproj – FAILED.

and it kept with many other like those.

The entire log is here: https://textdoc.co/tD6aTXLh3geqo5uk

I tried to many tutorials, between them: Install OpenCV GPU with CUDA for Windows 10 - ThinkInfi

I have it installed:

  • Cuda 12.2
  • CUDNN
  • fresh instalation of Python 3.11
  • Vistual Studio 2022 (with Desktop development with C++)
  • CMake 3.26.4 opencv and opencv-contrib 4.7.0 (source)

I’m running on a Windows 11 machine with 2060 Super

That pastebin appears to eat backslashes.

what source are you building? 4.7.0 release/tag?

is this proper VS 2022 or something else?

how did the cmake configuration step go? did it look okay?

the closest related stuff on the internet I could find is this: visual studio - Custom Build Tool only builds one item each time I build the project - Stack Overflow

delete build repo content and rebuild all

I edited the post to include this informations hut I have installed:

  • Cuda 12.2
  • CUDNN
  • fresh instalation of Python 3.11
  • Vistual Studio 2022 (with Desktop development with C++)
  • CMake 3.26.4 opencv and opencv-contrib 4.7.0 (source) release

And there are the log of CMake: https://textdoc.co/TudfOPlpIzUbGg5s

I’m running on a Windows 11 machine with 2060 Super

If it doesn’t work after you’ve done this can you post your CMake command line as well as the output from the build (not rebuild) step so I can check it on my machine.

that pastebin is for prose only. it fails to present any kind of code or “ASCII art” properly (eats backslashes and other special symbols, not monospace, …). I’d recommend using anything else, if you want to be sure that the presented data will be usable.

anyway, nothing caught my eye in the cmake configuration results.

I made a windows frash install and did the installation em english, now everthing went well… So thank you everyone for your help