Basically I have a program that uses OpenCV and would like run it on other computers without having to install OpenCV. I want to make the installation as simple as possible.
Tried running an exe file on another computer, but it said the following:
“The code execution cannot proceed because opencv_world420d.dll was not found. Reinstalling the program may fix this problem.”
You have to copy the needed OpenCV DLL files(and maybe other DLLs which come with the compiler) along with the executable (in the same folder - or the system folder).
The easiest way is to copy opencv_world420.dll (try to link to the release version of the library, which doesn’t end with “d”). If you want to reduce the file size, rebuild OpenCV without opencv_world and copy only the needed DLL files (opencv_core420.dll, opencv_imgproc420.dll etc.)
I have done that to some success. If the computer has Visual C++, it would run perfectly. However, when a machine does not have Visual C++ (in particular, one machine I tested on said "The code execution cannot proceed because CONCRT140D.dll was not found), it did not run. How do I fix this?
As I said, you also need other DLL files. CONCRT140D.dll makes part of the Visual C++ compiler dependencies. You either copy these files too, or give the Visual C++ redistributable installer.
You can try the dependency walker to get the list of all the needed DLLs.
You might need to recompile opencv with the right runtime “version”, because if you mix code/binaries that were compiled with dynamic and static microsoft runtime (and other variants like single/multi-threaded and debug/release) you will corrupt your heap.