Custom OpenCV + CUDA several warnings when building it

I’m trying to use OpenCV + CUDA and CUDNN for yolo on Windows. So i instaled Cmake and visual studio 2019, did every path of most tutorials, tried many versions of Opencv and Opencv contrib, Cuda and Cudnn and yet, every time i try to release the customized Opencv with visual studio it doesn’t work. I get several warnings (around 3 thousand), most of them #1394-D, saying (field of class type without DLL interface used in a class with a DLL interface) about opencv_core, opencv_cudaaarithm, opencv_dnn and so on. In the end it doesn’t shows any alert of error, unless i try to release with build_opencv_world=on, then i get a lot errors too and most of warnings are related to opencv_world450.lib missing.

When i try to run any test code using opencv gpu it works (like the ones using cv.cuda_GpuMat() and cv2.cuda.getCudaEnabledDeviceCount() funcions), but when i try to use yolo with gpu it doesn’t work:

net_yolo.setPreferableBackend(cv2.dnn.DNN_BACKEND_CUDA)
net_yolo.setPreferableTarget(cv2.dnn.DNN_TARGET_CUDA)

Notification says that Jupyter compiled everything normally, but the video with object detection simply bugs out and nothing happens. (i’ve tested in googlecolab and the code works fine with gpu) (also may arch bin is 6.1 for a 1050 GTX)

So i think that the biggest problem really is this several warnings, or maybe the problems with opencv_world.lib missing (i tried everything to build it and it simply doesn’t appears).

So i want any guidance that helps thinking about what could be the problem.

I tried with Opencv 4.5.0 4.5.1 4.5.5 and 4.6.0
I used CUDA 11.7 Cudnn 8.4.1

Now i’m trying again with Cuda 11.5 and Cudnn 8.3.3