hey all
so here's my problem: im just trying to learn a little opencv and ive been stuck at this for a while. When i run the following code, i get a runtime error " An application has made an attempt to load the C runtime library incorrectly ". This happens whenever i try to play an avi using this code

#include "stdafx.h"
#include "highgui.h"
 
int main(int argc, char *argv[])
{
	int c;
	IplImage *img;
	CvCapture* capture = cvCreateFileCapture( "test.avi" );
	cvNamedWindow("mainWin", CV_WINDOW_AUTOSIZE);
	cvMoveWindow("mainWin", 5, 5);
	while(1)
	{
		img=cvQueryFrame(capture);
		cvShowImage("mainWin", img );
		c=cvWaitKey(10);
		if(c == 27)
			break;
	}
	return 0;
}

Any suggestion?
Thnx

Looks like a setup issue of the OpenCV Library.
Can you run a basic program that just loads an image and displays it?
If not, I would suggest going through the installation instructions back from the beginning.

Also, give us information about your compiler and operating system next time.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.