Build VS 2015, Opencv 4.5.1 with cuda 11.0: LNK1210 exceeded internal ILK size limit(error only on debug mode)

you’ll need

  • surely: core, highgui, videoio
  • maybe: imgproc, imgcodecs
  • make sure to keep WITH_OPENGL
  • cudaoptflow, cudastereo, not sure what else

I can’t say what you won’t need.

some modules might depend on each other. the cmake configuration step will tell you if anything conflicts.

run print(cv.getBuildInformation()) if you want to see the final report from the cmake configuration step. it lists the modules. example:

  OpenCV modules:
    To be built:                 alphamat aruco bgsegm bioinspired calib3d ccalib core datasets dnn dnn_objdetect dnn_superres dpm face features2d flann freetype fuzzy hfs highgui img_hash imgcodecs imgproc intensity_transform line_descriptor mcc ml objdetect optflow phase_unwrapping photo plot python3 quality rapid reg rgbd saliency sfm shape stereo stitching structured_light superres surface_matching text tracking ts video videoio videostab viz wechat_qrcode xfeatures2d ximgproc xobjdetect xphoto
    Disabled:                    gapi java_bindings_generator js_bindings_generator objc_bindings_generator python_tests world
    Disabled by dependency:      -
    Unavailable:                 cnn_3dobj cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev cvv hdf java julia matlab ovis python2
    Applications:                apps
    Documentation:               NO
    Non-free algorithms:         YES