How to enable opensv dll to run exe

I am wondering how to allow OpenCV project exe file to run on other Windows 7 machines without changing other PCs. It works on mine, since I have all the libraries installed. Can I paste the necessary files into the folder with the exe file?

+4
source share
2 answers

You have to create a folder (for example ...project/libs ), put the libraries and VisualStudio in it (I think you are using VS), in Configuration Properties β†’ Linker β†’ General β†’ Additional Libraries Directories set the relative path this way:

"$ (SolutionDir) \ LIES"

Where $ (SolutionDir) is the path of your project. An environment variable can be created in Control Panel β†’ System and Security β†’ System β†’ Advanced System Settings β†’ Environment Variables. Then just click Create and add the path and variable name (SolutionDir).

+3
source

You can put all the necessary DLLs in the same folder as your exe, or put them in another folder (say C: / Programs / OpenCV / bin) and add this path to the System PATH.

To set PATH, go to "My Computer" - "Properties", "Advanced System Settings" β†’ environment variables and find "Path". Add your own, and do not forget to divide it into ";".

+1
source

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


All Articles