# OpencvCV doesnt include the right libs in vscode with cmake

**URL:** <https://forum.opencv.org/t/opencvcv-doesnt-include-the-right-libs-in-vscode-with-cmake/6086>\
**Category:** C++\
**Tags:** build\
**Created:** [November 8, 2021, 1:15am UTC](https://forum.opencv.org/t/opencvcv-doesnt-include-the-right-libs-in-vscode-with-cmake/6086 "2021-11-08T01:15:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nascimento210](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/nascimento210/32/3703_2.png) [@nascimento210](https://forum.opencv.org/u/nascimento210)\
**Post date:** [November 8, 2021, 1:15am UTC](https://forum.opencv.org/t/opencvcv-doesnt-include-the-right-libs-in-vscode-with-cmake/6086/1 "2021-11-08T01:15:37Z")

</div>

I had already dowloaded opencv4.5.3 prebuild packages and include the lib and bin to the system path, but when I try to run the .exe resulted by the debug I receive some erros telling me that opencv\_cored.dll, opencv\_imgprocd.dll and opencv\_highguid.dll were not fund  
that’s my cmake file:

```auto
cmake_minimum_required(VERSION 3.0.0)
project(opencvtest VERSION 0.1.0)

include(CTest)
enable_testing()

find_package( OpenCV REQUIRED )
include_directories( ${OpenCV_INCLUDE_DIRS})

add_library(
    CVUI
    cvui.h
    cvui.cpp
)

add_library(
    funcoes
    Funcs.h
    Funcs.cpp
)

add_executable(opencvtest main.cpp)

target_link_libraries( opencvtest ${OpenCV_LIBS} )
target_link_libraries(opencvtest CVUI)
target_link_libraries(opencvtest funcoes)

set(CPACK_PROJECT_NAME ${PROJECT_NAME})
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
include(CPack)

```

does anyone knows how to solve it?  
I’m using the visual studio compiler and the extesion cmake tools of vscode to configure cmake

thanks for your attention and sorry about the bad english

---

<div class="post-metadata">

**Author:** ![mshabunin](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/mshabunin/32/15_2.png) [@mshabunin](https://forum.opencv.org/u/mshabunin)\
**Post date:** [November 12, 2021, 8:16pm UTC](https://forum.opencv.org/t/opencvcv-doesnt-include-the-right-libs-in-vscode-with-cmake/6086/2 "2021-11-12T20:16:16Z")

</div>

On Windows you have to manually add location of OpenCV DLLs to the `PATH` environment variable before running the application. Exact method of modifying the environment depends on how you run the application.

---

<div class="post-metadata">

**Author:** ![nascimento210](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/nascimento210/32/3703_2.png) [@nascimento210](https://forum.opencv.org/u/nascimento210)\
**Post date:** [December 1, 2021, 4:25pm UTC](https://forum.opencv.org/t/opencvcv-doesnt-include-the-right-libs-in-vscode-with-cmake/6086/3 "2021-12-01T16:25:17Z")

</div>

thanks, now it works
