Ask Your Question

Error Opencv contrib, visual studion 2017, windows 10

asked 2019-09-01 12:06:56 -0500

updated 2019-09-01 12:17:32 -0500


I am trying to add opencv_contrib to opencv 4.0.1, i am using CMake in visual studio 2017, and Windows 10, i followed the steps here :

but in step 6 when i click configure, i get this error :

CMake Error at C:/opencv/sources/opencv/sources/cmake/OpenCVUtils.cmake:704 (pkg_check_modules): Unknown CMake command "pkg_check_modules". Call Stack (most recent call first): C:/opencv/sources/opencv_contrib-master/modules/freetype/CMakeLists.txt:6 (ocv_check_modules)

i seash some solution like this :

but it's not working for me, i need your help and thank you;

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2019-09-01 12:24:40 -0500

berak gravatar image

updated 2019-09-01 12:26:21 -0500

you probably downloaded the master (4.1.1-dev) opencv_contrib branch, and it won't work with your 4.0.1 main opencv, so either:

  • update your main opencv to master (4.1.1-dev), too,
  • checkout the 4.0.1 branch from the opencv_contrib repo
  • use 3.4 (stable) branch for both repos

in any case, clean build folder, and start from scratch with cmake

edit flag offensive delete link more


I used Opencv 4.0.1, with contrib 401 and it's working, Thank you berak.

Kitnos gravatar imageKitnos ( 2019-09-01 13:14:32 -0500 )edit

Question Tools

1 follower


Asked: 2019-09-01 12:06:56 -0500

Seen: 636 times

Last updated: Sep 01 '19