Why can't my C ++ program find the required .dll file?

I am trying to use OpenCV (Computer Vision Library), which seems to be using several DLL files located in C:\OpenCV\bin(which was added to the system variable PATH). However, if I try to run a simple test program, this will result in a system error:

The program cannot start because highgui.dll is missing from your computer. Try reinstalling the program to fix this problem.

If I copy the file highgui.dllto a folder system32, it works, but I do not want all the necessary .dll files to be in the folder system32.

Does anyone know why the .dll file was not found or what should I do to fix it?
(I checked all the paths in the variable PATHfor certainty.)

+3
source share
5 answers

, Netbeans , ( Netbeans, , ), , Netbeans DLL PATH = C:/OpenCV2.1/bin ( a > > ), !
, - , "" , ...
!

+1

highgui.dll . , , , , .

0

PATH?

, IDE Windows, , , PATH, .

, PATH System Control Panel, IDE , , PATH.

0

OpenCV 2.2 Visual Studio 10. ... 1.V++ → → C:\OpenCV2.2\include                      → C:\OpenCV2.2\lib 2.C/++ → → Include → C:\OpenCV2.2\bin 3.Linker → Input → opencv_core220.lib; opencv_highgui220.lib; opencv_calib3d220.lib; opencv_contrib220.lib; opencv_features2d220.lib; opencv_ffmpeg220.lib; opencv_flann220.lib; opencv_gpu220.lib; opencv_imgproc220.lib; opencv_legacy220.lib; opencv_ml220. Lib; opencv_objdetect220.lib; opencv_ts220.lib; opencv_video220.lib;

  • dll . , .
0

I had this problem using Visual Studio 12, and after checking to make sure that I didn’t have typos in my PATHtenth time, I noticed that there was a space after the half-colony from the previous path. I uninstalled it, and Visual Studio was able to find the DLLs I needed.

If you have several paths stored in your variable PATH, make sure they are separated by half colonies with no spaces .

0
source

Source: https://habr.com/ru/post/1741360/


All Articles