OpenCV build error while compiling with IE (Inference Engine)

518 views Asked by At

OpenCV Version: 4.4.0 (latest) OpenVINO Version: 2020.4 (latest)

The error happens when trying to build the project which is generated by CMake 3.18.0 on Windows 10. I have tried many times building from scratch (clear all caches, update the source code, reinstall the OpenVINO toolkit, and run it's all demos successfully), but the problem still exists.

Here is the VS 2019 build error logs:

46>Done building project "opencv_dnn.vcxproj" -- FAILED.

73>LINK : fatal error LNK1181: cannot open input file '..\..\lib\Release\opencv_dnn440.lib'
75>LINK : fatal error LNK1181: cannot open input file '..\..\lib\Release\opencv_dnn440.lib'
73>Done building project "opencv_text.vcxproj" -- FAILED.
81>------ Build started: Project: opencv_datasets, Configuration: Release x64 ------
82>------ Build started: Project: opencv_videostab, Configuration: Release x64 ------
75>Done building project "opencv_mcc.vcxproj" -- FAILED.

81>Done building project "opencv_datasets.vcxproj" -- FAILED.

88>Done building project "opencv_dnn_objdetect.vcxproj" -- FAILED.

87>LINK : fatal error LNK1181: cannot open input file '..\..\lib\Release\opencv_datasets440.lib'
87>Done building project "opencv_tracking.vcxproj" -- FAILED.

94>LINK : fatal error LNK1181: cannot open input file '..\..\lib\Release\opencv_tracking440.lib'
94>Done building project "opencv_stereo.vcxproj" -- FAILED.
95>cv2.cpp
95>D:\GitHub\opencv\opencv_contrib\modules\saliency\include\opencv2/saliency/saliencySpecializedClasses.hpp(1,1): warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss
95>D:\GitHub\opencv\opencv_contrib\modules\datasets\include\opencv2/datasets/dataset.hpp(1,1): warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss
93>LINK : fatal error LNK1181: cannot open input file '..\..\..\lib\Release\opencv_tracking440.lib'
93>Done building project "opencv_java.vcxproj" -- FAILED.
95>LINK : fatal error LNK1181: cannot open input file '..\..\lib\Release\opencv_dnn_superres440.lib'
95>Done building project "opencv_python3.vcxproj" -- FAILED.
96>------ Build started: Project: ALL_BUILD, Configuration: Release x64 ------
96>Building Custom Rule D:/GitHub/opencv/opencv/CMakeLists.txt

At the end 10 failed:

========== Build: 86 succeeded, 10 failed, 0 up-to-date, 0 skipped ==========

NOTE: Before I was able to build the OpenCV with IE without any errors but in the new release there are many errors while compiling and building.

Any solution..?

I am ready to provide more logs and info if needed.

Thanks!!

1

There are 1 answers

1
Bahramdun Adil On BEST ANSWER

The problem was solved by configuring CMake with ngraph flag and locating its CMake files DIR location.