I can't compile openCV with Cmake and MinGW on windows. I totally don't understand my mistake, please have a look:
Okay i can't post any picture. So here is the error:
CMake Error at cmake/OpenCVUtils.cmake:19 (if):
if given arguments:
"C:/BuildOpenCV" "MATCHES" "^C:/Users/Corentin/Desktop/C_C++/openCV/opencv" "OR" "C:/BuildOpenCV" "MATCHES" "^C:/BuildOpenCV"
Regular expression "^C:/Users/Corentin/Desktop/C_C++/openCV/opencv" cannot compile Call Stack (most recent call first): CMakeLists.txt:281 (ocv_include_directories)
My source directory :C:/Users/Corentin/Desktop/C_C++/openCV/opencv
Where to build binaries : C:/BuildOpenCV
Do you have any idea of what can cause this kind of issue? I'm a new user, i may have forgotten some important details, please forgive me =).
Thanks !
OpenCV is licensed as freeware for PC or laptop with Windows 32 bit and 64 bit operating system.
Surprisingly I had the same error today, and searched on stackoverflow for a solution... ;o)
The answer lies within the second error message: Regular expression "^C:/Users/Corentin/Desktop/C_C++/openCV/opencv" cannot compile
As you, did I name my folder ../C++/..
As the whole path is entered as a regular expression, "+" is interpreted as regex control sequence for "one or more characters". Therefore ++ has no meaning and the expression cannot compile.
The (quick) solution is to rename your directory to cpp or something else without control characters.
From my point of view this is a bug, as there could also be other "control characters" []().*+\{}? (Especially in windows) in a path string i.e Version numbers: OpenCV-2.4.1
I didn't have the time to register myself for reporting the bug, but maybe anyone else has already an account?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With