-1

code:

#include "stdafx.h"
#include"highgui.h"
#include"stdio.h"

int  main(int argc, CHAR* argv[])
{
    cvNamedWindow:( "Example2", CV_WINDOW_AUTOSIZE );
    CvCapture* capture = cvCreateFileCapture( "tendulkar.avi" );
    IplImage* frame;
    while(1) {
        frame = cvQueryFrame( capture );
        if( !frame ) break;
        cvShowImage( "Example2", frame );
        char c = cvWaitKey(33);
        if( c == 27 ) break;
    }
    cvReleaseCapture( &capture );
    cvDestroyWindow( "Example2" );
    return 0;
}
Ken White
  • 123,280
  • 14
  • 225
  • 444
Madhukeshwara
  • 19
  • 2
  • 6
  • possible duplicate of [error LNK2019: unresolved external symbol Visual C++](http://stackoverflow.com/questions/849238/error-lnk2019-unresolved-external-symbol-visual-c) – Ken White Jul 11 '11 at 04:07

1 Answers1

0

I suppose you didn't add opencv library to list of linked libraries. I don't know what versions of Visual Studio you are using but proper option should be somewhere in Project Properties / Configuration Properties / Linker / Input / Additional Dependencies

EDITED

check out this thread: http://social.msdn.microsoft.com/Forums/en/vclanguage/thread/14e85604-6929-4707-a22e-8cdf596926a6

especially Bao Baboon suggestion, this sounds like something newbie could do :)

grapkulec
  • 1,022
  • 13
  • 28
  • i m using VS10 and i includeded d open cv library to linked libraries.bt still got the same error. – Madhukeshwara Jul 12 '11 at 08:17
  • did you checked answer for a question that Ken linked? maybe opencv does not export this function? I think you should checked documentation for this library and/or ask about it on their support page. unresolved externals happen when linker can't find definition of function you use so either you don't link library or library does not export function – grapkulec Jul 12 '11 at 09:06
  • check edited part of my answer. if linked page won't help you I have no more suggestions because I don't know this library and I don't see your sources. sorry. – grapkulec Jul 12 '11 at 20:36