Unable to set up the system environment variable paths for opencv

I am using the Rust programming language with OpenCV.

I have installed Rust and I have downloaded the latest version 4.5.1. So I did download it and I did try to set it up in my system environment paths. I have setted up in this manner as according to this instruction

(note that the value column is named opencv_world451 instead of opencv_world412.

I am getting this error code using cargo build 0xc0000135 which according to this post

in instruction number 4, opencv is not being detected. Did I set it up incorrectly or something?

Hello try to put “d.lib” at the end of the linker: opencv_world451d.lib

I would guess that you need to add the opencv_world451.dll to the system/user path. You can do this through the gui shown in the link from your original post by adding the path to opencv_world451.dll to the path variable (probably something like C:\Users…\opencv\build\x64\vc15\bin). Note: if you add to the system path you may need to reboot your system in order to see the change. If you add to the user path then you will simply need to re-open the application/cmd etc. which you are building from.

Alternatively you can launch the command prompt and enter
set "path=C:\Users\<ACTUAL_PATH>\opencv\build\x64\vc15\bin\;%path%"
and then launch your application from there.

Another person also told me to add libopencv.dll to my path but this file doesn’t seem to exist, is this supposed to be included inside the download folder?

If you were using C++ you would need to add the path to the folder containing opencv_world451.dll to the system or user path or run your application from the directory containing it. In your case opencv_world451.dll should be located


therefore you would need to add


to your system or user path.

Are you saying it isn’t there or are you looking for libopencv.dll?

I am not familiar with Rust. It may have an internal variable like python which stores paths to dll’s which you may need to add to instead. But I would try adding to the system or user path first as this is a quick and easy to do.

1 Like

he’s saying someone gave him approximate advice (make the dlls findable) and he took it literally (precisely that identifier).

to state it plainly, the DLLs of opencv are named like opencv_core451.dll and so on. they are not named any other way.

sam: do not paraphrase what that other person said. that only causes misunderstanding. quote it or link to it.

1 Like