Yolo_mark icon indicating copy to clipboard operation
Yolo_mark copied to clipboard

Cannot open include file: "opencv2/opencv.hpp": No such file or directory

Open Niklaus28 opened this issue 3 years ago • 2 comments

I follow the instruction as below: To compile on Windows open yolo_mark.sln in MSVS2019, compile it x64 & Release and run the file: x64/Release/yolo_mark.cmd. Change paths in yolo_mark.sln to the OpenCV 4.1.0 installed on your computer:

(right click on project) -> properties -> C/C++ -> General -> Additional Include Directories: C:\C:\Opencv\opencv-4.1.0\opencv-4.1.0\include

(right click on project) -> properties -> Linker -> General -> Additional Library Directories: C:\Opencv\build\x64

but the error still appear

Niklaus28 avatar Jul 21 '20 03:07 Niklaus28

I think you got your directories wrong. Check your opencv directories.

(right click on project) -> properties -> C/C++ -> General -> Additional Include Directories: YOUR OPENCV DIR\build\install\include you should have the file "opencv.hpp" within your include directory

(Linker) YOUR OPENCV DIR\build\install\x64\vc16\lib you should have the "lib" files within your linker directory.

With these out of the way, I'm stuck with: image

stevenwong951028 avatar Aug 31 '20 06:08 stevenwong951028

I think you got your directories wrong. Check your opencv directories.

(right click on project) -> properties -> C/C++ -> General -> Additional Include Directories: YOUR OPENCV DIR\build\install\include you should have the file "opencv.hpp" within your include directory

(Linker) YOUR OPENCV DIR\build\install\x64\vc16\lib you should have the "lib" files within your linker directory.

With these out of the way, I'm stuck with: image

solved by copying the dll into the same directory

stevenwong951028 avatar Aug 31 '20 08:08 stevenwong951028