0
votes

I am trying to build the files in the "Source" folder to the "Build" folder using CMake in order to build OpenCV program in Eclipse. But I am facing the following error:

The C++ compiler "C:/MinGW/bin/g++.exe" is not able to compile a simple test program. It fails with the following output: Change Dir: C:/opencv/mbuild/CMakeFiles/CMakeTmp Run Build Command:"C:/CMake/bin/cmake.exe" "cmTC_03910/fast" CMake Error: The source directory "C:/opencv/mbuild/CMakeFiles/CMakeTmp/cmTC_03910/fast" does not exist. Specify --help for usage, or press the help button on the CMake GUI. CMake will not be able to correctly generate this project. Call Stack (most recent call first): CMakeLists.txt:93 (project)

I have installed MinGW several times along with CMake also, but still getting the same error.

Please help me out!! Thanks in advance

1
Please show your CMakeLists.txt otherwise we won't be able to see where the error may come from. Did you check whether the folder "C:/opencv/mbuild/CMakeFiles/CMakeTmp/cmTC_03910/fast" existed ?Sunreef
Thanks for the reply @Surneef. I don't know exactly where to find CMakeLists.txt. Moreover that folder does not exist. What shall I do now ?Ashutosh Mishra
How can you use CMake to build a program if you don't have a CMakeLists.txt ? It should be with your sources (or in a parent folder)Sunreef
Yes I am sorry, it's present in the Sources folderAshutosh Mishra
I had sometimes a similar problem because of my Antivirus. Can you disable it temporarily?Antonio

1 Answers

0
votes

As mentioned at this tutorial PyIMageSearch opencv install if you are using opencv version 3.1 you should set -D INSTALL_C_EXAMPLES=OFF \ instead ON I solved problem with this way