Error in building OpenCV [closed]
Hi, I am trying to build OpenCV (with contribe modules and cuda enabled) from scratch. I do this job more than ten times and I used it successfully but this time there is an error I do not recognize it. In the building section with visual studio I see about 100 errors like this one:
LINK : fatal error LNK1104: cannot open file '....\lib\Debug\opencv_imgproc330d.lib'
the steps of my building are:
1- Download OpenCV source files.
2- Download OpenCV_Contrib
3- Copy contrib modules to the source one.
4- Config and generate with CMake GUI.
5- Build with Visual studio 2015
I try it with different OpenCV versions, but there is no difference... Thanks a lot
System information (version)
OpenCV => 3.0 , 3.3 , 3.41
Operating System / Platform => Windows 10 64 Bit
Compiler => Visual Studio 2015
And this is the output of CMake:
Selecting Windows SDK version to target Windows 10.0.16299.
Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE) (Required is at least version "2.7")
Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE) (Required is at least version "2.6")
Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE) (Required is at least version "3.4")
Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE) (Required is at least version "3.2")
found Intel IPP (ICV version): 2017.0.2 [2017.0.2]
at: C:/A_Sharifian/opencv/build/3rdparty/ippicv/ippicv_win
found Intel IPP IW binaries: 2017.0.2
at: C:/A_Sharifian/opencv/build/3rdparty/ippicv/ippicv_win/../ippiw_win/
CUDA detected: 9.0
CUDA NVCC target flags: -gencode;arch=compute_52,code=sm_52;-D_FORCE_INLINES
Could not find OpenBLAS include. Turning OpenBLAS_FOUND off
Could not find OpenBLAS lib. Turning OpenBLAS_FOUND off
Could NOT find BLAS (missing: BLAS_LIBRARIES)
LAPACK requires BLAS
A library with LAPACK API not found. Please specify library location.
Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
Could NOT find JNI (missing: JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH)
VTK is not found. Please set -DVTK_DIR in CMake to VTK build directory, or to VTK install subdirectory with VTKConfig.cmake file
Caffe: NO
Protobuf: NO
Glog: NO
freetype2: NO
harfbuzz: NO
No preference for use of exported gflags CMake configuration set, and no hints for include/library directories provided. Defaulting to preferring an installed/exported gflags CMake configuration if available.
Failed to find installed gflags CMake configuration, searching for gflags build directories exported with CMake.
Failed to find gflags - Failed to find an installed/exported CMake configuration for gflags, will perform search for installed gflags components.
Failed to find gflags - Could not find gflags include directory, set GFLAGS_INCLUDE_DIR to directory containing gflags/gflags.h
Failed to find glog - Could not find glog include directory, set GLOG_INCLUDE_DIR to directory containing glog/logging.h
Module opencv_sfm disabled because the following dependencies are not found: Eigen Glog/Gflags
Excluding from source files list: C:/A_Sharifian/opencv/build/modules/imgproc/accum.neon.cpp
Torch importer has been enabled. To run the tests you have to install Torch ('th' executable should be available) and generate testdata using opencv_extra/testdata/dnn/generate_torch_models.py script ...
opencv_imgproc330d : it means that you are using 3.3.0. Try to post first error : build only imgproc project
thanks @LBerger, the first error is: Error LNK1104 cannot open file 'bin.lib' opencv_cudev C:\A_Sharifian\opencv\build\modules\cudev\LINK 1
and cuda version is?
cuda_9.0.176_win10
I think the error is not about cuda, compiler does not found .lib files. it should have some .lib files in .../lib/debug directory. I see my correct builds( in another system). It had .lib files in .../lib/debug/ directory. I do not know why it does not make these files...
insert in your post cmake output
I add it...
I don't understand :cudart nppc bin npps cufft What is bin.lib ? can you check in folder NVIDIA GPU Computing Toolkit\CUDA\v9.0\lib\x64 if bin.lib exist? if it does not then delete cmakecahe.txt and retry agian . Why don't you use opencv -3.4.1 or opencv-4.0pre ?
this .exe file did not exist in that folder And I do not know what is that file..... I used opencv 3.4.1 but the result is the same. I delete CMakecahe.txt and build it again. steal errors occurs...
What happen when cuda is disabled?