How Do I Build OpenCV With MS Visual Studio? [closed]
I am trying to build OpenCV with MS visual studio 2017, and can't get it to work. Cmake seems to work just fine, but when I build in VS, I get a string of errors. The only file in the BIN directory after build is opencv_cudev320d.dll.
Examples of the errors are:
MSB6006 "cmd.exe" exited with code 1 opencv_core
and
LNK1104 cannot open file "..\lib\debug\opencv_core320d.lib" opencv_ml
This is using the released version 3.2, I got the same results downloading the latest version in GitHub.
Any thoughts as to what I can do to fix this are appreciated.
try to build only opencv_core in VS 2017
OK, after a lot of work unchecking "build" and "with" options, I got it to build opencv_core320d.dll successfully. Now add things back in until it doesn't work?
I don't know what you have done. You can use cmake to build opencv project for vs. When you have got an error build only project with error in VS ( no need to disable anything in cmake) and then you can try to understand what happens : give firs error message in post. When you build opencv with vs it is better to disable cuda (uncheck all modules with cuda).
When build is ok then you can check cuda project
I removed all "BUILD" and "WITH" options that involved CUDA, and it worked, so apparently CUDA is the issue. So I can start learning OpenCV, perhaps with less performance, and worry about getting CUDA to work at a later time.
Thank you.