libiconv-2.dll error while playing video in OpenCV

1.1k views Asked by At

I tried to play a video using OpenCV-2.4.7 in Visual Studio 2010, Win 7

Code is as follow-

#include<opencv\cv.h>
#include <opencv\highgui.h>

using namespace cv;

int main( int argc, char** argv ) {
    cvNamedWindow( "Window", CV_WINDOW_AUTOSIZE );
    CvCapture* capture = cvCreateFileCapture( "C:/Users/17/Desktop/Wildlife.avi" );
    IplImage* frame;

    while(1) {
        frame = cvQueryFrame( capture );
        if( !frame ) break;
        cvShowImage( "Window", frame );
        char c = cvWaitKey(33);
        if( c == 27 ) break;
    }
    cvReleaseCapture( &capture );
    cvDestroyWindow( "Window" );
}

Debugs is fine but on running, a waring window opens saying "The program can't start because libiconv-2.dll is missing from your computer".

I tried to download libiconv-2.dll into system package then it showed the error "C:\Windows\System32\libiconv-2.dll', Binary was not built with debug information".

Is there any possible missing setting?? what should be done to run this code?

1

There are 1 answers

1
LCartwright On

It's an issue with opencv_ffmpeg247.dll in the latest release (2.4.7) as described here

I'm having the same issue, though with the fix earmarked for 2.4.8 I'd suggest either installing an earlier version (2.4.6) or using the latest copy from the repo here