Error compiling opencv 2.4.11 with mingw [closed]

asked 2015-09-02 06:39:44 -0600

Pedro Nogueira gravatar image

updated 2015-09-02 07:01:18 -0600

berak gravatar image

Hi there,

While compiling I get this error:

[ 29%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/window_w32.cpp.obj
F:\Transferencias\opencv\sources\modules\highgui\src\window_w32.cpp:1:0: warning: -fPIC ignored for target (all code is position independent) [enabled by default]
 /*M///////////////////////////////////////////////////////////////////////////////////////
 ^
F:\Transferencias\opencv\sources\modules\highgui\src\window_w32.cpp: In function 'int icvCreateTrackbar(const char*, const char*, int*, int, CvTrackbarCallback, CvTrackbarCallback2, void*)':
F:\Transferencias\opencv\sources\modules\highgui\src\window_w32.cpp:1853:81: error: 'BTNS_AUTOSIZE' was not declared in this scope
                                         WS_CHILD | CCS_TOP | TBSTYLE_WRAPABLE | BTNS_AUTOSIZE | BTNS_BUTTON,
                                                                                 ^
F:\Transferencias\opencv\sources\modules\highgui\src\window_w32.cpp:1853:97: error: 'BTNS_BUTTON' was not declared in this scope
                                         WS_CHILD | CCS_TOP | TBSTYLE_WRAPABLE | BTNS_AUTOSIZE | BTNS_BUTTON,
                                                                                                 ^
modules\highgui\CMakeFiles\opencv_highgui.dir\build.make:187: recipe for 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:2230: recipe for target 'modules/highgui/CMakeFiles/opencv_highgui.dir/all' failed
mingw32-make[1]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2
Makefile:159: recipe for target 'all' failed
mingw32-make: *** [all] Error 2

Any sugestions? Thanks, PN

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Pedro Nogueira
close date 2015-12-14 05:56:17.622484

Comments

which mingw version is it ?

also see here , please.

berak gravatar imageberak ( 2015-09-02 07:14:21 -0600 )edit

GNU Make 3.82.90

After downloading the latest version (3) from Github and runing with the cmake and mingw32-make instruction (including renaming sh.exe) everuthing worked fine.

Pedro Nogueira gravatar imagePedro Nogueira ( 2015-09-02 11:03:52 -0600 )edit

@Pedro Nogueira, so, solved ?

berak gravatar imageberak ( 2015-09-02 11:06:43 -0600 )edit