-1

Is it possible to build opencv c++ application (for windows) without environment variable for opencv executables. I want my own executable to run on another machine without opencv installed.

HappyBullying
  • 15
  • 1
  • 4
  • Maybe a statically linked executable? It'll be MUCH larger than a dynamic one since the libraries are packed into the .exe but it may solve your problem. https://stackoverflow.com/q/37398/7431860 – Nick Reed May 18 '21 at 22:15

1 Answers1

0

As far as I'm concerned you have two options:

1, It is possible using static linking, but usually OpenCV doesn't distribute the compiled static libraries. You will have to compile your own .lib and link against those to create a standalone executable.

2, You could use Dependency Walker tool to find dlls your program depends on. Then find the dlls on your system, and copy them to your program distribution (to folder that contains executable file).

Jeaninez - MSFT
  • 3,210
  • 1
  • 5
  • 20