OpenCV 4.4.0 with CUDA support install nvcc fatal error


I’ve been trying to install OpenCV with CUDA support for the purpose of using cudaimgproc in C++. I used CMake to generate build files for OpenCV by following this installation guide: How to Build OpenCV 4.1.1 with GPU (CUDA) Suport on Windows

On compiling the build with the command:
msbuild INSTALL.vcxproj /p:Configuration=Release -verbosity:detailed

The build fails with the NVCC fatal message below:
Processing OpenCL kernels (core) Building NVCC (Device) object modules/core/CMakeFiles/cuda_compile_1.dir/src/cuda/Release/ nvcc fatal : A single input file is required for a non-link phase when an outputfile is specified CMake Error at (message): Error generating D:/GitHub/Laser_System/opencv/build/modules/core/CMakeFiles/cuda_compile_1.dir/src/cuda/Release/

As another way, I did try building the INSTALL.vcxproj directly on Visual Studio 2019 in Release and x64 mode and that failed as well with LNK1181 errors (shown in the attachment). I confirmed at least opencv_core440.lib is in the correct path being searched. I have also attached the output from attempting to build OpenCV on the Visual Studio x64 command prompt.

I’m quite new to this so I appreciate all the help. Please let me know if there’s any more info I need to provide.

OUTPUT.txt (37.8 KB)

The issue is resolved now. Not sure what was the exact problem but using opencv version 4.2 and opencv_contrib 4.2 allowed the installation to complete fine. Previously I was using version 4.3.