OpenCV 2.2 Windows XP MinGW crashes on namedWindow, imshow

I downloaded the latest versions of OpenCV 2.2 for Windows and compiled on Windows XP using MinGW 4.4.1 using CMake 2.8.

Everything went smoothly, and compilation (mingw32-make) and installation (mingw32-make install) were successfully completed.

However, when I compile some code containing the namedWindow () and imshow () functions from highgui, it compiles, but the program crashes. The following one line of code fails:

namedWindow ("img", CV_WINDOW_AUTOSIZE);

Sample programs that ship with OpenCV, displaying images, also fail.

Has anyone experienced the same problem and have a solution?

I also compiled and use OpenCV 2.2 on Linux (Ubuntu) without any problems.

Many thanks.

+5
source share
1 answer

I have the same problem. I created OpenCV 2.2 under WindowsXP using CMake, MSYS-make, and mingw.

The explanation is described here: mingw32 SSE / SSE2 instability

I have done the following:

  • Use CMake (2.8.4), specify the target directory and run "Configure" for MSYS make.
  • Enter Debugin "CMAKE_BUILD_TYPE".
  • Uncheck the box for "SSE2".
  • Run "Configure" again.
  • Run Generate.
  • Run makein the target directory.
  • Run it make install.

It worked for me.

+4
source

All Articles