c++ - Compiling OpenCV 2.4.13 with Cmake and MinGW -
i got problem when trying compile opencv using cmake , mingw.
for cmake: sourcecode located in "c:\cpp libraries\opencv-2.4.13\opencv\sources" binaries goint build in: "c:/cpp libraries/opencv-2.4.13/opencv/build/x64/mingw"
i've used cmake generate makefile.
when run makefile:
c:\cpp libraries\opencv-2.4.13\opencv\build\x64\mingw>mingw32-make
this output after 31%
[ 31%] building cxx object modules/highgui/cmakefiles/opencv_highgui.dir/src/window_w32.cpp.obj c:\cpp libraries\opencv-2.4.13\opencv\sources\modules\highgui\src\window_w32.cpp: in function 'int icvcreatetrackbar(const char*, const char*, int*, int, cvtrackbarcallback, cvtrackbarcallback2, void*)': c:\cpp libraries\opencv-2.4.13\opencv\sources\modules\highgui\src\window_w32.cpp:1853:81: error: 'btns_autosize' not declared in scope ws_child | ccs_top | tbstyle_wrapable | btns_autosize | btns_button, ^ c:\cpp libraries\opencv-2.4.13\opencv\sources\modules\highgui\src\window_w32.cpp:1853:97: error: 'btns_button' not declared in scope ws_child | ccs_top | tbstyle_wrapable | btns_autosize | btns_button, ^ modules\highgui\cmakefiles\opencv_highgui.dir\build.make:187: recipe target 'modules/highgui/cmakefiles/opencv_highgui.dir/src/window_w32.cpp.obj' failed mingw32-make[2]: *** [modules/highgui/cmakefiles/opencv_highgui.dir/src/window_w32.cpp.obj] error 1 cmakefiles\makefile2:2203: recipe target 'modules/highgui/cmakefiles/opencv_highgui.dir/all' failed mingw32-make[1]: *** [modules/highgui/cmakefiles/opencv_highgui.dir/all] error 2 makefile:159: recipe target 'all' failed mingw32-make: *** [all] error 2
does knows solution, because have no clue one.
//edit!
after downloaded version git repository , try build got these other errors. try change #define _win32_ie 0x0300 #define _win32_ie 0x0500 in "commctrl.h" in mingw directory, didn't worl.
c:\cpp libraries\opencv-2.4.13\git\opencv\build\x64\mingw>mingw32-make [ 2%] built target zlib [ 6%] built target libtiff [ 11%] built target libjpeg [ 16%] built target libwebp [ 19%] built target libjasper [ 20%] built target libpng [ 26%] built target ilmimf [ 26%] built target opencv_core_pch_dephelp [ 26%] built target pch_generate_opencv_core [ 26%] building cxx object modules/core/cmakefiles/opencv_core.dir/src/parallel.cpp.obj c:\cpp libraries\opencv-2.4.13\git\opencv\modules\core\src\parallel.cpp: in function 'int cv::getthreadnum()': c:\cpp libraries\opencv-2.4.13\git\opencv\modules\core\src\parallel.cpp:474:45: error: 'pthread_self' not declared in scope return (int)(size_t)(void*)pthread_self(); // no zero-based indexing ^ modules\core\cmakefiles\opencv_core.dir\build.make:990: recipe target 'modules/core/cmakefiles/opencv_core.dir/src/parallel.cpp.obj' failed mingw32-make[2]: *** [modules/core/cmakefiles/opencv_core.dir/src/parallel.cpp.obj] error 1 cmakefiles\makefile2:1473: recipe target 'modules/core/cmakefiles/opencv_core.dir/all' failed mingw32-make[1]: *** [modules/core/cmakefiles/opencv_core.dir/all] error 2 makefile:159: recipe target 'all' failed mingw32-make: *** [all] error 2
the problem (according artur wieczorek) os version set mingw default. cure find "commctrl.h" in mingw directory , like
#if 0 #define _win32_ie 0x0300 #endif
then change to
#if 1 #define _win32_ie 0x0500 #endif
Comments
Post a Comment