曾经出现过像这样一PIA一PIA的问题:
1>VideoDlg.obj : error LNK2019: unresolved external symbol AVI_close referenced in function "public: static unsigned long __cdecl CVideoDlg::CaptureThreadProc(void *)" (?CaptureThreadProc@CVideoDlg@@SAKPAX@Z)
1>VideoDlg.obj : error LNK2019: unresolved external symbol AVI_write_frame referenced in function "public: static unsigned long __cdecl CVideoDlg::CaptureThreadProc(void *)" (?CaptureThreadProc@CVideoDlg@@SAKPAX@Z)
1>VideoDlg.obj : error LNK2019: unresolved external symbol AVI_set_audio referenced in function "public: int __cdecl CVideoDlg::StartRec(void)" (?StartRec@CVideoDlg@@QAAHXZ)
1>VideoDlg.obj : error LNK2019: unresolved external symbol AVI_set_video referenced in function "public: int __cdecl CVideoDlg::StartRec(void)" (?StartRec@CVideoDlg@@QAAHXZ)
1>VideoDlg.obj : error LNK2019: unresolved external symbol AVI_open_output_file referenced in function "public: int __cdecl CVideoDlg::StartRec(void)" (?StartRec@CVideoDlg@@QAAHXZ)
翻译一下,就是
在函数 "public: static unsigned long __cdecl CVideoDlg::CaptureThreadProc(void *) 里引用的函数 AVI_close 未定义(是一个未解决的外部符号)
我的解决方法是:
在文件头部加上 #pragma comment (lib, "zc030x/AVILIB")
注意是AVILIB,不是AVILIB.H