Ask Your Question
0

WITH_WIN32UI Errors compiling OpenCV 2.4.8 with mingw

asked 2014-03-25 19:50:29 -0600

George Profenza gravatar image

I'm trying to compile OpenCV 2.4.8 on Windows 8 with mingw but got stuck on this errors:

[ 36%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/win
dow_w32.cpp.obj
cd /d C:\Users\HM\Downloads\opencv-2.4.8\opencv\buildMingW32\modules\highgui &&
C:\MinGW\bin\g++.exe   -DCVAPI_EXPORTS -DHIGHGUI_EXPORTS -fsigned-char -mstackre
align -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wform
at -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-
arith -Wshadow -Wsign-promo -fdiagnostics-show-option -march=i686 -fomit-frame-p
ointer -msse -msse2 -mfpmath=sse -ffunction-sections -Wno-deprecated-declaration
s -O2 -DNDEBUG  -DNDEBUG @CMakeFiles/opencv_highgui.dir/includes_CXX.rsp    -inc
lude "C:/Users/HM/Downloads/opencv-2.4.8/opencv/buildMingW32/modules/highgui/pre
comp.hpp" -Winvalid-pch  -o CMakeFiles\opencv_highgui.dir\src\window_w32.cpp.obj
 -c C:\Users\HM\Downloads\opencv-2.4.8\opencv\sources\modules\highgui\src\window
_w32.cpp
C:\Users\HM\Downloads\opencv-2.4.8\opencv\sources\modules\highgui\src\window_w32
.cpp: In function 'void cvSetModeWindow_W32(const char*, double)':
C:\Users\HM\Downloads\opencv-2.4.8\opencv\sources\modules\highgui\src\window_w32
.cpp:477:71: error: 'MonitorFromRect' was not declared in this scope
C:\Users\HM\Downloads\opencv-2.4.8\opencv\sources\modules\highgui\src\window_w32
.cpp: In function 'LRESULT MainWindowProc(HWND, UINT, WPARAM, LPARAM)':
C:\Users\HM\Downloads\opencv-2.4.8\opencv\sources\modules\highgui\src\window_w32
.cpp:1355:69: error: 'MonitorFromRect' was not declared in this scope
mingw32-make[2]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/src/window_w
32.cpp.obj] Error 1
mingw32-make[2]: Leaving directory `C:/Users/HM/Downloads/opencv-2.4.8/opencv/bu
ildMingW32'
mingw32-make[1]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2

mingw32-make[1]: Leaving directory `C:/Users/HM/Downloads/opencv-2.4.8/opencv/bu
ildMingW32'
mingw32-make: *** [all] Error 2

If I uncheck with WITH_WIN32UI in CMake the library gets build, but anything using windows from highgui crashes at runtime. Any tips on I could move on ?

edit retag flag offensive close merge delete

Comments

1

when did you download it ? there were some changes done lately, you might have to update

berak gravatar imageberak ( 2014-03-26 02:05:22 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2014-04-10 01:22:21 -0600

edit flag offensive delete link more

Comments

This worked for me too. Now I'm getting some weird crashes at runtime though, but that's something else(for another question). Thanks(+1)

George Profenza gravatar imageGeorge Profenza ( 2014-04-13 17:05:02 -0600 )edit

Question Tools

Stats

Asked: 2014-03-25 19:50:29 -0600

Seen: 1,525 times

Last updated: Apr 10 '14