#include<QtCore/QCoreApplication>#include<cv.h>
#include<highgui.h>
#include<stdio.h>
#include<string.h>
intmain(intargc,char*argv[])
{
QCoreApplicationa(argc,argv);
CvCapture*AVIfile=NULL;
cvCaptureFromFile("C:\\OpenCV2.2\\samples\\cpp\\Qt_sample\\cube4.avi");
if(!AVIfile){
return1;
}
cvReleaseCapture(&AVIfile);
returna.exec();
}
This code just builds fine, but when I tried to run it, the application is crashed. When tried to debug by setting break points, I could notice that immediately after the cvCaptureFromFile method is invoked, some assembly code shows up, and a message box comes in telling that "Inferior stopped because it received a signal from the operating system. Signal Name : SIGSEGV. Signal meaning: Segmentation fault. My .pro file is
QT += core
QT -= gui
TARGET = Dec28C1
CONFIG += console
CONFIG -= app_bundle
TEMPLATE = app
SOURCES += main.cpp
INCLUDEPATH += C:\OpenCV2.2\include\opencv C:\OpenCV2.2\include
LIBS += C:\OpenCV2.2\lib\*.lib
I am struggling with this since 1st January. I could compile and run some other programs well. But don't know. What to do with this error. Please help me.