OpenCV 4.2.0 Error dlls when using exe on other computer

Hi everyone.

I am contacting you because I encounter some errors on my opencv project.

I developed a solution that uses “highgui” and “imgproc” to analyse a video stream of a camera in order to alert the user when an aircraft is approaching a certain area of the stream.

I programmed that under Visual Studio 2019 using OpenCV 4.2.0 .

Now, I need to debug my program using the exe with static library on another windows 10 computer.
I downloaded OpenCV using the same link, following the same tutorial but I can’t run the program.

I added the environment variable so that the exe knows where to fin the opencv bin folder with all the dlls but it doesn’t work.

I have errors like : “msvcp140d.dll not found …” ; “Concrt140d.dll not found”; “VCruntime140D.dll not found”.

I then tried to copy paste the OpenCV folder on the same folder as my exe but still not working. It throws me this error : “opencv_world420d.dll not found …”.

Could you help me resolving this mystery ?

Thanks in advance !

Thomas

You need to copy across and add to the system/user path the correct visual studio debug redistributable (e.g. C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Redist\MSVC\14.28.29325\debug_nonredist\x64\Microsoft.VC142.DebugCRT) or build release and install the visual studio redistributable.

Thank you for your response.

So I must do that in order to run an exe using opencv on a computer that is only used by normal users and not programmers ?

Normally you would compile a release build and then the user would install the visual studio redistributable.

You will probably find the PC you are getting the error from will probably already have the desired redistributable installed as a result of the instalation of another program which required it.

Ok thanks you !

I will try this solution.

I will let you know if this worked.

1 Like

Hi CudaWarped,

I tried what you recommended me to do.

For some reason, it didn’t fixed the errors.
I manually added the missing dlls in my exe folder and it works now.

Thank you again for you help and for your reactivity concerning my problem.

Have a great day !

Thomas