First time here? Check out the FAQ!
answered 2019-06-14 23:37:57 -0600
it seems, you looked at outdated opencv2.4 build instructions-
there is no opencv_legacy or opencv_contrib module in current opencv
but quite likely, you have to additionally link opencv_imgcodecs and opencv_videoio
opencv_imgcodecs
opencv_videoio