openCV 243使用静态库错误LNK2019 [英] openCV 243 using static libs error LNK2019

查看:596
本文介绍了openCV 243使用静态库错误LNK2019的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在64位vs10控制台应用程序中使用openCV243静态库。我的操作系统是win7 64位。

I'm trying to use openCV243 static libs in 64bit vs10 console application. My OS is win7 64 bit.

我已包含以下libs:

I've included following libs:

#pragma comment(lib,"../final_test/libs/staticlib/opencv_core243.lib")
#pragma comment(lib,"../final_test/libs/staticlib/opencv_highgui243.lib")
#pragma comment(lib,"../final_test/libs/staticlib/opencv_imgproc243.lib")       
#pragma comment(lib,"../final_test/libs/staticlib/opencv_video243d.lib")        
#pragma comment(lib,"../final_test/libs/staticlib/opencv_flann243.lib")
#pragma comment(lib,"../final_test/libs/staticlib/opencv_features2d243.lib")
#pragma comment(lib,"../final_test/libs/staticlib/opencv_objdetect243.lib")
#pragma comment(lib,"../final_test/libs/staticlib/opencv_core243.lib")
#pragma comment(lib,"../final_test/libs/staticlib/opencv_calib3d243.lib")       
#pragma comment(lib,"../final_test/libs/staticlib/opencv_legacy243.lib")
#pragma comment(lib,"../final_test/libs/staticlib/opencv_features2d243.lib")
#pragma comment(lib,"../final_test/libs/staticlib/opencv_ml243.lib")
#pragma comment(lib,"../final_test/libs/staticlib/libjpeg.lib")
#pragma comment(lib,"../final_test/libs/staticlib/libpng.lib")
#pragma comment(lib,"../final_test/libs/staticlib/libtiff.lib")
#pragma comment(lib,"../final_test/libs/staticlib/libjasper.lib")
#pragma comment(lib,"../final_test/libs/staticlib/zlib.lib")
#pragma comment(lib,"../final_test/libs/staticlib/IlmImf.lib")
#pragma comment(lib,"../final_test/libs/staticlib/opencv_videostab243") 
#pragma comment(lib,"../final_test/libs/staticlib/opencv_contrib243.lib")
#pragma comment(lib,"../final_test/libs/staticlib/opencv_nonfree243.lib")
#pragma comment(lib,"../final_test/libs/staticlib/opencv_photo243.lib")
#pragma comment(lib,"../final_test/libs/staticlib/opencv_stitching243.lib")
#pragma comment(lib,"../final_test/libs/staticlib/IlmImf.lib")
#pragma comment(lib,"../final_test/libs/staticlib/opencv_ts243.lib")

运行时库是:Multi -threaded(/ MT)

The runtime library is: Multi-threaded (/MT)

我收到以下链接错误。

I get following linking errors.

1>opencv_highgui243.lib(cap_vfw.obj) : error LNK2019: unresolved external symbol AVIFileInit referenced in function "void __cdecl icvInitCapture_VFW(void)" (?icvInitCapture_VFW@@YAXXZ)
1>opencv_highgui243.lib(cap_vfw.obj) : error LNK2019: unresolved external symbol AVIStreamGetFrameOpen referenced in function "public: virtual bool __cdecl CvCaptureAVI_VFW::open(char const *)" (?open@CvCaptureAVI_VFW@@UEAA_NPEBD@Z)
1>opencv_highgui243.lib(cap_vfw.obj) : error LNK2019: unresolved external symbol AVIStreamInfoA referenced in function "public: virtual bool __cdecl CvCaptureAVI_VFW::open(char const *)" (?open@CvCaptureAVI_VFW@@UEAA_NPEBD@Z)
1>opencv_highgui243.lib(cap_vfw.obj) : error LNK2019: unresolved external symbol AVIFileGetStream referenced in function "public: virtual bool __cdecl CvCaptureAVI_VFW::open(char const *)" (?open@CvCaptureAVI_VFW@@UEAA_NPEBD@Z)
1>opencv_highgui243.lib(cap_vfw.obj) : error LNK2019: unresolved external symbol AVIFileOpenA referenced in function "public: virtual bool __cdecl CvCaptureAVI_VFW::open(char const *)" (?open@CvCaptureAVI_VFW@@UEAA_NPEBD@Z)
1>opencv_highgui243.lib(cap_vfw.obj) : error LNK2019: unresolved external symbol AVIStreamGetFrame referenced in function "public: virtual bool __cdecl CvCaptureAVI_VFW::grabFrame(void)" (?grabFrame@CvCaptureAVI_VFW@@UEAA_NXZ)
1>opencv_highgui243.lib(cap_vfw.obj) : error LNK2019: unresolved external symbol ICClose referenced in function "protected: void __cdecl CvCaptureCAM_VFW::closeHIC(void)" (?closeHIC@CvCaptureCAM_VFW@@IEAAXXZ)
1>opencv_highgui243.lib(cap_vfw.obj) : error LNK2019: unresolved external symbol ICSendMessage referenced in function "protected: void __cdecl CvCaptureCAM_VFW::closeHIC(void)" (?closeHIC@CvCaptureCAM_VFW@@IEAAXXZ)

...

谁能帮助我摆脱这个问题?谢谢。

can anyone help me to rid of this problem? Thank you.

推荐答案

您需要链接到MS vfw32.lib 库。

You need to link with MS vfw32.lib library.

这篇关于openCV 243使用静态库错误LNK2019的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆