开发者

visual studio 1error LNK2001: unresolved external symbol _mainCRTStartup,2 error LNK1120: 1 unresolved externals

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", fram开发者_开发问答e );
        char c = cvWaitKey(33);
        if( c == 27 ) break;
    }
    cvReleaseCapture( &capture );
    cvDestroyWindow( "Example2" );
    return 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 :)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜