Windows 中带有 mingw 的 Opencv2.4.0 崩溃了 [英] Opencv2.4.0 with mingw in windows get crashed

查看:15
本文介绍了Windows 中带有 mingw 的 Opencv2.4.0 崩溃了的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我按照步骤 opencv.

完全忽略文件夹...opencvuildx86mingwin"和...opencvuildx86mingwlib".

I followed steps in this SO link to compile a sample program using OpenCV2.4.0 in windows. I made a setup both in DEVC++ and NetBeans with Mingw. My sample Program is getting Compiled properly, but when I run the exe the application get crashes.

But In same machine I used opencv2.1.0 and the same sample program gets compiled and there is no crash while running it.

The below is the Sample Code I tried to execute:

#include "highgui.h"
using namespace std;
int main( int argc, char** argv ) {
IplImage* img = cvLoadImage( "C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures\Water lilies.jpg" );
cvNamedWindow( "Sample", CV_WINDOW_AUTOSIZE );
cvShowImage( "Sample", img );
cvWaitKey(0);
cvReleaseImage( &img );
cvDestroyWindow( "Sample" );
} 

UPDATE :

I follwed as the steps as moskito-x link to build the opencv and when I press "configure", I get the following error. And my make file is also 35kb in size. Any suggestions to solve this?

解决方案

Using the libs in "...opencvuildx86mingwin" and "...opencvuildx86mingwlib

You can not use the libraries that come with OpenCV-2.4.x.exe.

As some developers in forums and I find out. On some systems, the precompiled libs of "opencv 2.4.x" can not be used.
To compile your own programs, works, but it crashed if you try to run them. Until there are not functioning precompiled libs of "opencv 2.4.x , you have to compile opencv yourself.

Ignore so the folder "...opencvuildx86mingwin" and "...opencvuildx86mingwlib" completely.

这篇关于Windows 中带有 mingw 的 Opencv2.4.0 崩溃了的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆