OpenCV 2.2 Windows XP MinGW在namedWindow,imshow上崩溃 [英] OpenCV 2.2 Windows XP MinGW build crashes on namedWindow, imshow
问题描述
我下载了最新的OpenCV 2.2源代码为Windows,并在Windows XP上使用MinGW 4.4.1在CMake 2.8的帮助下编译。
I downloaded the latest OpenCV 2.2 sources for Windows and compiled on Windows XP using MinGW 4.4.1, with the help of CMake 2.8.
一切顺利,编译(mingw32-make)和安装(mingw32-make install)已成功完成。
Everything went smoothly and compilation (mingw32-make) and installation (mingw32-make install) completed successfully.
然而,当我编译一些包含namedWindow()和imgu它编译但程序崩溃。以下单行代码崩溃:
However, when I compile some code containing namedWindow() and imshow() functions of highgui, it compiles but the program crashes. The following single line of code crashes:
namedWindow(img,CV_WINDOW_AUTOSIZE);
namedWindow("img", CV_WINDOW_AUTOSIZE);
示例程序
有人遇到过同样的问题,你有办法吗?
Have anyone experienced the same problem, and do you have a solution?
我也编译并使用OpenCV 2.2在linux(Ubuntu)上没有任何问题。
I have also compiled and am using OpenCV 2.2 on linux (Ubuntu) without any problem.
非常感谢。
推荐答案
我有同样的问题。我在WindowsXP下创建了OpenCV 2.2,使用CMake,MSYS-make和mingw。
I've the same problem. I built OpenCV 2.2 under WindowsXP, using CMake, MSYS-make and mingw.
解决方案解释如下: mingw32 SSE / SSE2不稳定性
我做了以下工作: p>
What I have done is the following:
- 使用CMake(2.8.4),指定目标目录并为MSYS的make运行Configure。
- 在SSE2中删除复选标记。
- 在CMAKE_BUILD_TYPE上输入
Debug
再次运行配置。 - 运行生成。
- 在目标位置运行
make
- Use CMake (2.8.4), specify target directory and run "Configure" for MSYS's make.
- Type
Debug
at "CMAKE_BUILD_TYPE". - Remove checkmark for "SSE2".
- Run "Configure" again.
- Run "Generate".
- Run
make
at target directory. - Run
make install
.
这对我有用。
This worked for me.
这篇关于OpenCV 2.2 Windows XP MinGW在namedWindow,imshow上崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!