Opencv_contrib: The error when building OpenCV with extra modules

Created on 10 Dec 2016  Â·  10Comments  Â·  Source: opencv/opencv_contrib

hello, I have a problem when i want to build extra modules of Opencv, I got this error
CMake Error at C:/opencv/opencv_contrib-master/modules/text/CMakeLists.txt:22 (ocv_add_testdata):
Unknown CMake command "ocv_add_testdata".

Do you konw how to solve this poblem? Thanks!

invalid

Most helpful comment

still get this error after git sync

git clone https://github.com/opencv/opencv.git
cd opencv
git checkout 3.1.0

git clone https://github.com/opencv/opencv_contrib.git
cd opencv_contrib
git checkout 3.1.0

All 10 comments

You should keep both opencv/opencv_contrib repositories "in sync".

sorry, I don't quit understand. Do you mean this?
CMake Error at C:/opencv/opencv_contrib/modules/text/CMakeLists.txt:22 (ocv_add_testdata):
Unknown CMake command "ocv_add_testdata".

I mean you should run git fetch/pull for both opencv/opencv_contrib repositories.
For more questions please please refer to GitHub manuals at first.

ok. Thanks a lot

15 days after i still don't understand you mean ..?

still get this error after git sync

git clone https://github.com/opencv/opencv.git
cd opencv
git checkout 3.1.0

git clone https://github.com/opencv/opencv_contrib.git
cd opencv_contrib
git checkout 3.1.0

@vsmelov , modules/text/CMakeLists.txt does not contain ocv_add_testdata command in version 3.1.0, it means something is wrong with your opencv_contrib repository.

@mshabunin you are right , the text file must not contain ocv_add_tesdata command however I did not realize that since i delete it from the text file .Then it has worked .
Thx for reply

Just comment these line no 22,23,24 from CMakeLists.txt

Please help
modules/surface_matching/CMakeFiles/opencv_surface_matching.dir/all
How to solve this error massage

Was this page helpful?
0 / 5 - 0 ratings