Solved OpenCV build problem
-
Hello everyone !
I'm trying to build opencv 4.3.0 on an other computer but I am facing some problems.
The install went perfectly without errors and after all nstallation, I've got this setup in my C:\ folder :
C:\opencv\
· .cache\
· 3rdparty\
· apps\
· cmake\
· data\
· doc\
· include\
o opencv2\
§ opencv.hpp
· modules\
· platforms\
· samples\
C:\opencv-build\
· 3rdparty\
· apps\
· bin\
· CMakeFiles\
· configured\
· data\
· doc\
· include\
· install\
o etc\ o include\ · opencv2\ · calib3d\ · core\ · dnn\ · features2d\ · flann\ · highgui\ · imgcodecs\ · imgproc\ · ml\ · objdetect\ · photo\ · stitching\ · video\ · videoio\ o x64\
· lib\
· modules\
· opencv2\
· python_loader\
· test-reports\
· tmp\
· win-install\
The first strange thing is that I don't have all cpp files in my include folder under C:\opencv
So I tried to change the .pro file to this to find the good hpp files :INCLUDEPATH += C:\opencv-build\install\include\ LIBS += C:\opencv-build\bin\libopencv_core430.dll LIBS += C:\opencv-build\bin\libopencv_highgui430.dll LIBS += C:\opencv-build\bin\libopencv_imgcodecs430.dll LIBS += C:\opencv-build\bin\libopencv_imgproc430.dll LIBS += C:\opencv-build\bin\libopencv_features2d430.dll LIBS += C:\opencv-build\bin\libopencv_calib3d430.dll
But when I compile my code, everything works perfectly until the program start and crash immediatly.
Do you know what did I do wrong ?
Thanks !
-
Hi,
The likely issue is that the OpenCV .dlls are not found. Go to the Run part of the Project Panel and change the PATH environment variable to also contain "C:\opencv-build\bin".
-
Hi,
In facts the problem solved itself for no reason (maybe because I restarted the computer).
Thanks for your help !