So I need to build OpenCV C++ 4.9.0 with contrib modules(specifically cuda modules, but preferably all of them). I’m building it with CMake-gui 3.29.0 on Windows 10 and Visual Studio 2022 as generator. I don’t have Nvidia GPU installed on machine.
Configuring and generation run without errors, but when comes the building part, it throws 100+ errors with 50+ warnings.
Severity Code Description Project File Line Suppression State Details
Error no instance of overloaded function "reduce" matches the argument list opencv_cudaoptflow E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudaoptflowsrccudapyrlk.cu 477
Error no instance of overloaded function "cv::cudev::blockReduce" matches the argument list opencv_test_cudev E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudevincludeopencv2cudevgriddetailreduce.hpp 379
Error MSB8066 Custom build for 'E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudevtesttest_arithm_func.cu;E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudevtesttest_arithm_op.cu;E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudevtesttest_bitwize_op.cu;E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudevtesttest_cmp_op.cu;E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudevtesttest_color_cvt.cu;E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudevtesttest_cvt.cu;E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudevtesttest_deriv.cu;E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudevtesttest_integral.cu;E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudevtesttest_lut.cu;E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudevtesttest_nd.cu;E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudevtesttest_pyramids.cu;E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudevtesttest_reduction.cu;E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudevtesttest_scan.cu;E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudevtesttest_split_merge.cu;E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudevtesttest_warp.cu;E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudevtesttranspose.cu' exited with code 1. opencv_test_cudev C:Program FilesMicrosoft Visual Studio2022CommunityMSBuildMicrosoftVCv170Microsoft.CppCommon.targets 254
Error C3861 'cudnnSetRNNDescriptor_v6': identifier not found opencv_dnn E:OpenCV CMake 2nd trysourceopencv-4.9.0modulesdnnsrccuda4dnncslcudnnrecurrent.hpp 122
Error LNK1104 cannot open file '....libDebugopencv_dnn490d.lib' opencv_text E:OpenCV CMake 2nd trybuildmodulestextLINK 1
Error LNK1104 cannot open file '....libDebugopencv_dnn490d.lib' opencv_video E:OpenCV CMake 2nd trybuildmodulesvideoLINK 1
Error LNK1104 cannot open file '....libDebugopencv_video490d.lib' opencv_ximgproc E:OpenCV CMake 2nd trybuildmodulesximgprocLINK 1
Error LNK1104 cannot open file '....libDebugopencv_text490d.lib' opencv_test_text E:OpenCV CMake 2nd trybuildmodulestextLINK 1
Error LNK1104 cannot open file '....libDebugopencv_ximgproc490d.lib' opencv_perf_ximgproc E:OpenCV CMake 2nd trybuildmodulesximgprocLINK 1
Error LNK1104 cannot open file '....libDebugopencv_ximgproc490d.lib' opencv_test_ximgproc E:OpenCV CMake 2nd trybuildmodulesximgprocLINK 1
Error LNK1104 cannot open file '....libDebugopencv_dnn490d.lib' opencv_test_dnn E:OpenCV CMake 2nd trybuildmodulesdnnLINK 1
Error LNK1104 cannot open file '....libDebugopencv_ximgproc490d.lib' opencv_optflow E:OpenCV CMake 2nd trybuildmodulesoptflowLINK 1
Error LNK1104 cannot open file '....libDebugopencv_video490d.lib' opencv_test_video E:OpenCV CMake 2nd trybuildmodulesvideoLINK 1
Error LNK1104 cannot open file '....libDebugopencv_video490d.lib' opencv_perf_video E:OpenCV CMake 2nd trybuildmodulesvideoLINK 1
Error LNK1104 cannot open file '....libDebugopencv_optflow490d.lib' opencv_test_optflow E:OpenCV CMake 2nd trybuildmodulesoptflowLINK 1
Error LNK1104 cannot open file '....libDebugopencv_optflow490d.lib' opencv_perf_optflow E:OpenCV CMake 2nd trybuildmodulesoptflowLINK 1
Error LNK1104 cannot open file '....libDebugopencv_video490d.lib' opencv_gapi E:OpenCV CMake 2nd trybuildmodulesgapiLINK 1
Error LNK1104 cannot open file '....libDebugopencv_video490d.lib' opencv_bgsegm E:OpenCV CMake 2nd trybuildmodulesbgsegmLINK 1
Error LNK1104 cannot open file '....libDebugopencv_gapi490d.lib' opencv_test_gapi E:OpenCV CMake 2nd trybuildmodulesgapiLINK 1
Error LNK1104 cannot open file '....libDebugopencv_bgsegm490d.lib' opencv_test_bgsegm E:OpenCV CMake 2nd trybuildmodulesbgsegmLINK 1
Error LNK1104 cannot open file '....libDebugopencv_gapi490d.lib' opencv_perf_gapi E:OpenCV CMake 2nd trybuildmodulesgapiLINK 1
Error LNK1104 cannot open file '....libDebugopencv_dnn490d.lib' opencv_perf_dnn E:OpenCV CMake 2nd trybuildmodulesdnnLINK 1
Error LNK1104 cannot open file '....libDebugopencv_text490d.lib' opencv_datasets E:OpenCV CMake 2nd trybuildmodulesdatasetsLINK 1
Error LNK1104 cannot open file '....libDebugopencv_dnn490d.lib' opencv_objdetect E:OpenCV CMake 2nd trybuildmodulesobjdetectLINK 1
Error LNK1104 cannot open file '....libDebugopencv_datasets490d.lib' opencv_tracking E:OpenCV CMake 2nd trybuildmodulestrackingLINK 1
Error LNK1104 cannot open file '....libDebugopencv_tracking490d.lib' opencv_test_tracking E:OpenCV CMake 2nd trybuildmodulestrackingLINK 1
Error LNK1104 cannot open file '....libDebugopencv_objdetect490d.lib' opencv_xobjdetect E:OpenCV CMake 2nd trybuildmodulesxobjdetectLINK 1
Error LNK1104 cannot open file '....libDebugopencv_tracking490d.lib' opencv_stereo E:OpenCV CMake 2nd trybuildmodulesstereoLINK 1
Error LNK1104 cannot open file '....libDebugopencv_stereo490d.lib' opencv_test_stereo E:OpenCV CMake 2nd trybuildmodulesstereoLINK 1
Error LNK1104 cannot open file '........libDebugopencv_xobjdetect490d.lib' opencv_waldboost_detector E:OpenCV CMake 2nd trybuildmodulesxobjdetecttoolswaldboost_detectorLINK 1
Error LNK1104 cannot open file '....libDebugopencv_stereo490d.lib' opencv_perf_stereo E:OpenCV CMake 2nd trybuildmodulesstereoLINK 1
Error LNK1104 cannot open file '....libDebugopencv_tracking490d.lib' opencv_perf_tracking E:OpenCV CMake 2nd trybuildmodulestrackingLINK 1
Error LNK1104 cannot open file '....libDebugopencv_objdetect490d.lib' opencv_wechat_qrcode E:OpenCV CMake 2nd trybuildmoduleswechat_qrcodeLINK 1
Error LNK1104 cannot open file '....libDebugopencv_objdetect490d.lib' opencv_test_objdetect E:OpenCV CMake 2nd trybuildmodulesobjdetectLINK 1
Error LNK1104 cannot open file '....libDebugopencv_wechat_qrcode490d.lib' opencv_test_wechat_qrcode E:OpenCV CMake 2nd trybuildmoduleswechat_qrcodeLINK 1
Error LNK1104 cannot open file '....libDebugopencv_wechat_qrcode490d.lib' opencv_perf_wechat_qrcode E:OpenCV CMake 2nd trybuildmoduleswechat_qrcodeLINK 1
Error LNK1104 cannot open file '....libDebugopencv_objdetect490d.lib' opencv_perf_objdetect E:OpenCV CMake 2nd trybuildmodulesobjdetectLINK 1
Error LNK1104 cannot open file '....libDebugopencv_objdetect490d.lib' opencv_interactive-calibration E:OpenCV CMake 2nd trybuildappsinteractive-calibrationLINK 1
Error LNK1104 cannot open file '....libDebugopencv_objdetect490d.lib' opencv_aruco E:OpenCV CMake 2nd trybuildmodulesarucoLINK 1
Error LNK1104 cannot open file '....libDebugopencv_objdetect490d.lib' opencv_dpm E:OpenCV CMake 2nd trybuildmodulesdpmLINK 1
Error LNK1104 cannot open file '....libDebugopencv_aruco490d.lib' opencv_test_aruco E:OpenCV CMake 2nd trybuildmodulesarucoLINK 1
Error LNK1104 cannot open file '....libDebugopencv_aruco490d.lib' opencv_perf_aruco E:OpenCV CMake 2nd trybuildmodulesarucoLINK 1
Error LNK1104 cannot open file '....libDebugopencv_dnn490d.lib' opencv_model_diagnostics E:OpenCV CMake 2nd trybuildappsmodel-diagnosticsLINK 1
Error LNK1104 cannot open file '....libDebugopencv_dnn490d.lib' opencv_mcc E:OpenCV CMake 2nd trybuildmodulesmccLINK 1
Error LNK1104 cannot open file '....libDebugopencv_dnn490d.lib' opencv_dnn_superres E:OpenCV CMake 2nd trybuildmodulesdnn_superresLINK 1
Error LNK1104 cannot open file '....libDebugopencv_mcc490d.lib' opencv_test_mcc E:OpenCV CMake 2nd trybuildmodulesmccLINK 1
Error LNK1104 cannot open file '....libDebugopencv_dnn_superres490d.lib' opencv_test_dnn_superres E:OpenCV CMake 2nd trybuildmodulesdnn_superresLINK 1
Error LNK1104 cannot open file '....libDebugopencv_dnn_superres490d.lib' opencv_perf_dnn_superres E:OpenCV CMake 2nd trybuildmodulesdnn_superresLINK 1
Error LNK1104 cannot open file '....libDebugopencv_dnn490d.lib' opencv_dnn_objdetect E:OpenCV CMake 2nd trybuildmodulesdnn_objdetectLINK 1
Error LNK1104 cannot open file '....libDebugopencv_video490d.lib' opencv_cudabgsegm E:OpenCV CMake 2nd trybuildmodulescudabgsegmLINK 1
Error LNK1104 cannot open file '....libDebugopencv_cudabgsegm490d.lib' opencv_test_cudabgsegm E:OpenCV CMake 2nd trybuildmodulescudabgsegmLINK 1
Error LNK1104 cannot open file '....libDebugopencv_cudabgsegm490d.lib' opencv_perf_cudabgsegm E:OpenCV CMake 2nd trybuildmodulescudabgsegmLINK 1
Error no instance of overloaded function "cv::cudev::blockReduce" matches the argument list opencv_cudaarithm E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudevincludeopencv2cudevgriddetailreduce.hpp 379
Error no instance of overloaded function "cv::cudev::blockReduce" matches the argument list opencv_cudaarithm E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudevincludeopencv2cudevgriddetailreduce.hpp 379
Error no instance of overloaded function "cv::cudev::blockReduce" matches the argument list opencv_cudaarithm E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudevincludeopencv2cudevgriddetailreduce.hpp 379
Error no instance of overloaded function "cv::cudev::blockReduce" matches the argument list opencv_cudaarithm E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudevincludeopencv2cudevgriddetailreduce.hpp 379
Error no instance of overloaded function "cv::cudev::blockReduce" matches the argument list opencv_cudaarithm E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudevincludeopencv2cudevgriddetailreduce.hpp 379
Error no instance of overloaded function "cv::cudev::blockReduce" matches the argument list opencv_cudaarithm E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudevincludeopencv2cudevgriddetailreduce.hpp 379
Error no instance of overloaded function "cv::cudev::blockReduce" matches the argument list opencv_cudaarithm E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudevincludeopencv2cudevgriddetailreduce.hpp 379
Error MSB8066 Custom build for 'E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudaarithmsrccudaabsdiff_mat.cu;E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudaarithmsrccudaabsdiff_scalar.cu;E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudaarithmsrccudaadd_mat.cu;E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudaarithmsrccudaadd_scalar.cu;E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudaarithmsrccudaadd_weighted.cu;E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudaarithmsrccudabitwise_mat.cu;E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudaarithmsrccudabitwise_scalar.cu;E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudaarithmsrccudacmp_mat.cu;E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudaarithmsrccudacmp_scalar.cu;E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudaarithmsrccudacopy_make_border.cu;E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudaarithmsrccudacountnonzero.cu;E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudaarithmsrccudadiv_mat.cu;E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudaarithmsrccudadiv_scalar.cu;E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudaarithmsrccudain_range.cu;E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudaarithmsrccudaintegral.cu;E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudaarithmsrccudalut.cu;E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudaarithmsrccudamath.cu;E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudaarithmsrccudaminmax.cu;E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudaarithmsrccudaminmax_mat.cu;E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudaarithmsrccudaminmaxloc.cu;E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudaarithmsrccudamul_mat.cu;E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudaarithmsrccudamul_scalar.cu;E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudaarithmsrccudamul_spectrums.cu;E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudaarithmsrccudanorm.cu;E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudaarithmsrccudanormalize.cu;E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudaarithmsrccudapolar_cart.cu;E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudaarithmsrccudareduce.cu;E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudaarithmsrccudasplit_merge.cu;E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudaarithmsrccudasub_mat.cu;E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudaarithmsrccudasub_scalar.cu;E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudaarithmsrccudasum.cu;E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudaarithmsrccudathreshold.cu;E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudaarithmsrccudatranspose.cu' exited with code 1. opencv_cudaarithm C:Program FilesMicrosoft Visual Studio2022CommunityMSBuildMicrosoftVCv170Microsoft.CppCommon.targets 254
Error LNK1104 cannot open file '....libDebugopencv_cudaarithm490d.lib' opencv_perf_cudaarithm E:OpenCV CMake 2nd trybuildmodulescudaarithmLINK 1
Error LNK1104 cannot open file '....libDebugopencv_cudaarithm490d.lib' opencv_test_cudaarithm E:OpenCV CMake 2nd trybuildmodulescudaarithmLINK 1
Error LNK1104 cannot open file '....libDebugopencv_cudaarithm490d.lib' opencv_xfeatures2d E:OpenCV CMake 2nd trybuildmodulesxfeatures2dLINK 1
Error LNK1104 cannot open file '....libDebugopencv_xfeatures2d490d.lib' opencv_perf_xfeatures2d E:OpenCV CMake 2nd trybuildmodulesxfeatures2dLINK 1
Error LNK1104 cannot open file '....libDebugopencv_xfeatures2d490d.lib' opencv_test_xfeatures2d E:OpenCV CMake 2nd trybuildmodulesxfeatures2dLINK 1
Error LNK1104 cannot open file '....libDebugopencv_cudaarithm490d.lib' opencv_cudafilters E:OpenCV CMake 2nd trybuildmodulescudafiltersLINK 1
Error LNK1104 cannot open file '....libDebugopencv_cudafilters490d.lib' opencv_perf_cudafilters E:OpenCV CMake 2nd trybuildmodulescudafiltersLINK 1
Error LNK1104 cannot open file '....libDebugopencv_cudafilters490d.lib' opencv_test_cudafilters E:OpenCV CMake 2nd trybuildmodulescudafiltersLINK 1
Error no instance of overloaded function "cv::cuda::device::reduceKeyVal" matches the argument list opencv_cudafeatures2d E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudafeatures2dsrccudabf_match.cu 75
Error MSB8066 Custom build for 'E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudafeatures2dsrccudabf_knnmatch.cu;E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudafeatures2dsrccudabf_match.cu;E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudafeatures2dsrccudabf_radius_match.cu;E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudafeatures2dsrccudafast.cu;E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudafeatures2dsrccudaorb.cu' exited with code 1. opencv_cudafeatures2d C:Program FilesMicrosoft Visual Studio2022CommunityMSBuildMicrosoftVCv170Microsoft.CppCommon.targets 254
Error LNK1104 cannot open file '....libDebugopencv_cudafeatures2d490d.lib' opencv_test_cudafeatures2d E:OpenCV CMake 2nd trybuildmodulescudafeatures2dLINK 1
Error LNK1104 cannot open file '....libDebugopencv_cudafeatures2d490d.lib' opencv_perf_cudafeatures2d E:OpenCV CMake 2nd trybuildmodulescudafeatures2dLINK 1
Error C2440 'specialization': cannot convert from 'NppStatus (__cdecl *)(NppiSize,int,size_t *)' to '`anonymous-namespace'::get_buf_size_c1_t' opencv_cudaimgproc E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudaimgprocsrchistogram.cpp 519
Error C2440 'specialization': cannot convert from 'NppStatus (__cdecl *)(NppiSize,int,size_t *)' to '`anonymous-namespace'::get_buf_size_c1_t' opencv_cudaimgproc E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudaimgprocsrchistogram.cpp 521
Error C2440 'specialization': cannot convert from 'NppStatus (__cdecl *)(NppiSize,int,size_t *)' to '`anonymous-namespace'::get_buf_size_c1_t' opencv_cudaimgproc E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudaimgprocsrchistogram.cpp 522
Error C2737 'hist_callers': const object must be initialized opencv_cudaimgproc E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudaimgprocsrchistogram.cpp 517
Error C2440 'specialization': cannot convert from 'NppStatus (__cdecl *)(NppiSize,int [],size_t *)' to '`anonymous-namespace'::get_buf_size_c4_t' opencv_cudaimgproc E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudaimgprocsrchistogram.cpp 543
Error C2440 'specialization': cannot convert from 'NppStatus (__cdecl *)(NppiSize,int [],size_t *)' to '`anonymous-namespace'::get_buf_size_c4_t' opencv_cudaimgproc E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudaimgprocsrchistogram.cpp 545
Error C2440 'specialization': cannot convert from 'NppStatus (__cdecl *)(NppiSize,int [],size_t *)' to '`anonymous-namespace'::get_buf_size_c4_t' opencv_cudaimgproc E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudaimgprocsrchistogram.cpp 546
Error C2737 'hist_callers': const object must be initialized opencv_cudaimgproc E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudaimgprocsrchistogram.cpp 541
Error C2440 'specialization': cannot convert from 'NppStatus (__cdecl *)(NppiSize,int,size_t *)' to '`anonymous-namespace'::get_buf_size_c1_t' opencv_cudaimgproc E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudaimgprocsrchistogram.cpp 561
Error C2440 'specialization': cannot convert from 'NppStatus (__cdecl *)(NppiSize,int,size_t *)' to '`anonymous-namespace'::get_buf_size_c1_t' opencv_cudaimgproc E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudaimgprocsrchistogram.cpp 563
Error C2440 'specialization': cannot convert from 'NppStatus (__cdecl *)(NppiSize,int,size_t *)' to '`anonymous-namespace'::get_buf_size_c1_t' opencv_cudaimgproc E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudaimgprocsrchistogram.cpp 564
Error C2440 'specialization': cannot convert from 'NppStatus (__cdecl *)(NppiSize,int,size_t *)' to '`anonymous-namespace'::get_buf_size_c1_t' opencv_cudaimgproc E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudaimgprocsrchistogram.cpp 566
Error C2737 'hist_callers': const object must be initialized opencv_cudaimgproc E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudaimgprocsrchistogram.cpp 559
Error C2440 'specialization': cannot convert from 'NppStatus (__cdecl *)(NppiSize,int [],size_t *)' to '`anonymous-namespace'::get_buf_size_c4_t' opencv_cudaimgproc E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudaimgprocsrchistogram.cpp 582
Error C2440 'specialization': cannot convert from 'NppStatus (__cdecl *)(NppiSize,int [],size_t *)' to '`anonymous-namespace'::get_buf_size_c4_t' opencv_cudaimgproc E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudaimgprocsrchistogram.cpp 584
Error C2440 'specialization': cannot convert from 'NppStatus (__cdecl *)(NppiSize,int [],size_t *)' to '`anonymous-namespace'::get_buf_size_c4_t' opencv_cudaimgproc E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudaimgprocsrchistogram.cpp 585
Error C2440 'specialization': cannot convert from 'NppStatus (__cdecl *)(NppiSize,int [],size_t *)' to '`anonymous-namespace'::get_buf_size_c4_t' opencv_cudaimgproc E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudaimgprocsrchistogram.cpp 587
Error C2737 'hist_callers': const object must be initialized opencv_cudaimgproc E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudaimgprocsrchistogram.cpp 580
Error LNK1104 cannot open file '....libDebugopencv_cudaimgproc490d.lib' opencv_perf_cudaimgproc E:OpenCV CMake 2nd trybuildmodulescudaimgprocLINK 1
Error LNK1104 cannot open file '....libDebugopencv_cudaimgproc490d.lib' opencv_test_cudaimgproc E:OpenCV CMake 2nd trybuildmodulescudaimgprocLINK 1
Error no instance of overloaded function "cv::cuda::device::reduce" matches the argument list opencv_photo E:OpenCV CMake 2nd trysourceopencv-4.9.0modulesphotosrccudanlm.cu 421
Error no instance of overloaded function "cv::cuda::device::reduce" matches the argument list opencv_photo E:OpenCV CMake 2nd trysourceopencv-4.9.0modulesphotosrccudanlm.cu 421
Error no instance of overloaded function "cv::cuda::device::reduce" matches the argument list opencv_photo E:OpenCV CMake 2nd trysourceopencv-4.9.0modulesphotosrccudanlm.cu 421
Error MSB8066 Custom build for 'E:OpenCV CMake 2nd trysourceopencv-4.9.0modulesphotosrccudanlm.cu' exited with code 1. opencv_photo C:Program FilesMicrosoft Visual Studio2022CommunityMSBuildMicrosoftVCv170Microsoft.CppCommon.targets 254
Error LNK1104 cannot open file '....libDebugopencv_photo490d.lib' opencv_xphoto E:OpenCV CMake 2nd trybuildmodulesxphotoLINK 1
Error LNK1104 cannot open file '....libDebugopencv_photo490d.lib' opencv_test_photo E:OpenCV CMake 2nd trybuildmodulesphotoLINK 1
Error LNK1104 cannot open file '....libDebugopencv_xphoto490d.lib' opencv_perf_xphoto E:OpenCV CMake 2nd trybuildmodulesxphotoLINK 1
Error LNK1104 cannot open file '....libDebugopencv_xphoto490d.lib' opencv_test_xphoto E:OpenCV CMake 2nd trybuildmodulesxphotoLINK 1
Error LNK1104 cannot open file '....libDebugopencv_photo490d.lib' opencv_perf_photo E:OpenCV CMake 2nd trybuildmodulesphotoLINK 1
Error LNK1104 cannot open file '....libDebugopencv_photo490d.lib' opencv_face E:OpenCV CMake 2nd trybuildmodulesfaceLINK 1
Error LNK1104 cannot open file '....libDebugopencv_face490d.lib' opencv_test_face E:OpenCV CMake 2nd trybuildmodulesfaceLINK 1
Error C1083 Cannot open include file: 'cuviddec.h': No such file or directory opencv_cudacodec C:Program FilesNVIDIA GPU Computing ToolkitCUDAv12.4includenvcuvid.h 38
Error LNK1104 cannot open file '....libDebugopencv_cudacodec490d.lib' opencv_test_cudacodec E:OpenCV CMake 2nd trybuildmodulescudacodecLINK 1
Error LNK1104 cannot open file '....libDebugopencv_cudacodec490d.lib' opencv_perf_cudacodec E:OpenCV CMake 2nd trybuildmodulescudacodecLINK 1
Error no instance of overloaded function "reduce" matches the argument list opencv_cudalegacy E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudalegacysrccudafgd.cu 187
Error MSB8066 Custom build for 'E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudalegacysrccudaNCV.cu;E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudalegacysrccudaNCVBroxOpticalFlow.cu;E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudalegacysrccudaNCVHaarObjectDetection.cu;E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudalegacysrccudaNCVPyramid.cu;E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudalegacysrccudaNPP_staging.cu;E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudalegacysrccudabm.cu;E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudalegacysrccudabm_fast.cu;E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudalegacysrccudacalib3d.cu;E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudalegacysrccudaccomponetns.cu;E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudalegacysrccudafgd.cu;E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudalegacysrccudagmg.cu;E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudalegacysrccudaneedle_map.cu' exited with code 1. opencv_cudalegacy C:Program FilesMicrosoft Visual Studio2022CommunityMSBuildMicrosoftVCv170Microsoft.CppCommon.targets 254
Error no instance of overloaded function "reduce" matches the argument list opencv_cudaoptflow E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudaoptflowsrccudapyrlk.cu 215
Error no instance of overloaded function "reduce" matches the argument list opencv_cudaoptflow E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudaoptflowsrccudapyrlk.cu 283
Error no instance of overloaded function "reduce" matches the argument list opencv_cudaoptflow E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudaoptflowsrccudapyrlk.cu 410
Error MSB8066 Custom build for 'E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudaoptflowsrccudafarneback.cu;E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudaoptflowsrccudanvidiaOpticalFlow.cu;E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudaoptflowsrccudapyrlk.cu;E:OpenCV CMake 2nd trysourceopencv_contrib-4.9.0modulescudaoptflowsrccudatvl1flow.cu' exited with code 1. opencv_cudaoptflow C:Program FilesMicrosoft Visual Studio2022CommunityMSBuildMicrosoftVCv170Microsoft.CppCommon.targets 254
Error LNK1104 cannot open file '....libDebugopencv_cudafeatures2d490d.lib' opencv_stitching E:OpenCV CMake 2nd trybuildmodulesstitchingLINK 1
Error LNK1104 cannot open file '....libDebugopencv_cudalegacy490d.lib' opencv_test_cudalegacy E:OpenCV CMake 2nd trybuildmodulescudalegacyLINK 1
Error LNK1104 cannot open file '....libDebugopencv_cudalegacy490d.lib' opencv_perf_cudalegacy E:OpenCV CMake 2nd trybuildmodulescudalegacyLINK 1
Error LNK1104 cannot open file '....libDebugopencv_stitching490d.lib' opencv_test_stitching E:OpenCV CMake 2nd trybuildmodulesstitchingLINK 1
Error LNK1104 cannot open file '....libDebugopencv_stitching490d.lib' opencv_perf_stitching E:OpenCV CMake 2nd trybuildmodulesstitchingLINK 1
Error LNK1104 cannot open file '....libDebugopencv_cudaoptflow490d.lib' opencv_perf_cudaoptflow E:OpenCV CMake 2nd trybuildmodulescudaoptflowLINK 1
Error LNK1104 cannot open file '....libDebugopencv_cudacodec490d.lib' opencv_superres E:OpenCV CMake 2nd trybuildmodulessuperresLINK 1
Error LNK1104 cannot open file '....libDebugopencv_photo490d.lib' opencv_videostab E:OpenCV CMake 2nd trybuildmodulesvideostabLINK 1
Error LNK1104 cannot open file '....libDebugopencv_cudaoptflow490d.lib' opencv_test_cudaoptflow E:OpenCV CMake 2nd trybuildmodulescudaoptflowLINK 1
Error LNK1104 cannot open file '....libDebugopencv_videostab490d.lib' opencv_test_videostab E:OpenCV CMake 2nd trybuildmodulesvideostabLINK 1
Error LNK1104 cannot open file '....libDebugopencv_superres490d.lib' opencv_test_superres E:OpenCV CMake 2nd trybuildmodulessuperresLINK 1
Error LNK1104 cannot open file '....libDebugopencv_superres490d.lib' opencv_perf_superres E:OpenCV CMake 2nd trybuildmodulessuperresLINK 1
Error LNK1104 cannot open file '....libDebugopencv_cudalegacy490d.lib' opencv_cudaobjdetect E:OpenCV CMake 2nd trybuildmodulescudaobjdetectLINK 1
Error LNK1104 cannot open file '....libDebugopencv_cudaobjdetect490d.lib' opencv_perf_cudaobjdetect E:OpenCV CMake 2nd trybuildmodulescudaobjdetectLINK 1
Error LNK1104 cannot open file '....libDebugopencv_cudaobjdetect490d.lib' opencv_test_cudaobjdetect E:OpenCV CMake 2nd trybuildmodulescudaobjdetectLINK 1
Error LNK1104 cannot open file '....libDebugopencv_dnn_superres490d.lib' opencv_python3 E:OpenCV CMake 2nd trybuildmodulespython3LINK 1
(There was no space for warnings)
At first, even the configuration threw errors. After reading opencv’s CMake configuration logs, configuration and generation went without errors. I tried building opencv in the VS solution afterwards, it threw errors that are listed above. I tried searching about it, but not even opencv docs and searching in forums helped me.
I expected it to just build without errors, or at least a decent documentation/tutorial on building opencv with contrib modules. So can you help me point what exactly is wrong in my building process or whether this is a version problem and i should try to build a slightly older version like 4.7.0 or 4.4.0?
And also a little last question: why there are no pre-built binaries with contrib modules?
AeroLibra is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.