2011-11-11 34 views
13

Tôi đang cố gắng sử dụng OpenCV 2.3.1 cho ứng dụng xử lý và quay video. Tôi đã tải xuống các thư viện biên dịch sẵn từ here và đã đi đến biên dịch một ứng dụng thử nghiệm bằng cách sử dụng các thư viện tĩnh được tìm thấy trong thư mục tải xuống build\x86\vc10\staticlib. Khi cố gắng biên dịch, Visual Studio chào đón tôi với các lỗi trình liên kết được hiển thị bên dưới. Sau khi làm việc với libpng, gzip và một vài người khác trong quá khứ, tôi nhận ra các hàm từ các thư viện đó trong các lỗi liên kết.Các ký hiệu ngoài chưa được giải quyết OpenCV - Các thư viện khác cần thiết?

Việc sử dụng các thư viện được biên dịch trước của OpenCV cũng yêu cầu tôi liên kết trong libpng, libjpeg, gzip và nhiều thứ khác, hay tôi thiếu gì đó?

1>opencv_core231d.lib(persistence.obj) : error LNK2019: unresolved external symbol _gzputs referenced in function "void __cdecl icvPuts(struct CvFileStorage *,char const *)" ([email protected]@[email protected]@[email protected]) 
1>opencv_core231d.lib(persistence.obj) : error LNK2019: unresolved external symbol _gzclose referenced in function "void __cdecl icvClose(struct CvFileStorage *)" ([email protected]@[email protected]@@Z) 
1>opencv_core231d.lib(persistence.obj) : error LNK2019: unresolved external symbol _gzopen referenced in function _cvOpenFileStorage 
1>opencv_core231d.lib(persistence.obj) : error LNK2019: unresolved external symbol _gzgets referenced in function "char * __cdecl icvGets(struct CvFileStorage *,char *,int)" ([email protected]@[email protected]@[email protected]) 
1>opencv_core231d.lib(persistence.obj) : error LNK2019: unresolved external symbol _gzrewind referenced in function "void __cdecl icvRewind(struct CvFileStorage *)" ([email protected]@[email protected]@@Z) 
1>opencv_core231d.lib(persistence.obj) : error LNK2019: unresolved external symbol _gzeof referenced in function "int __cdecl icvEof(struct CvFileStorage *)" ([email protected]@[email protected]@@Z) 
1>opencv_highgui231d.lib(window_w32.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "int __cdecl icvCreateTrackbar(char const *,char const *,int *,int,void (__cdecl*)(int),void (__cdecl*)(int,void *),void *)" ([email protected]@[email protected]@[email protected]) 
1>opencv_highgui231d.lib(cap_vfw.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "public: virtual void __thiscall CvCaptureAVI_VFW::close(void)" ([email protected][email protected]@UAEXXZ) 
1>opencv_highgui231d.lib(cap_vfw.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "public: virtual void __thiscall CvCaptureAVI_VFW::close(void)" ([email protected][email protected]@UAEXXZ) 
1>opencv_highgui231d.lib(cap_vfw.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "public: virtual void __thiscall CvCaptureAVI_VFW::close(void)" ([email protected][email protected]@UAEXXZ) 
1>opencv_highgui231d.lib(cap_vfw.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "public: virtual bool __thiscall CvCaptureAVI_VFW::open(char const *)" ([email protected][email protected]@[email protected]) 
1>opencv_highgui231d.lib(cap_vfw.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "public: virtual bool __thiscall CvCaptureAVI_VFW::open(char const *)" ([email protected][email protected]@[email protected]) 
1>opencv_highgui231d.lib(cap_vfw.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "public: virtual bool __thiscall CvCaptureAVI_VFW::open(char const *)" ([email protected][email protected]@[email protected]) 
1>opencv_highgui231d.lib(cap_vfw.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "public: virtual bool __thiscall CvCaptureAVI_VFW::open(char const *)" ([email protected][email protected]@[email protected]) 
1>opencv_highgui231d.lib(cap_vfw.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "void __cdecl icvInitCapture_VFW(void)" ([email protected]@YAXXZ) 
1>opencv_highgui231d.lib(cap_vfw.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "public: virtual bool __thiscall CvCaptureAVI_VFW::grabFrame(void)" ([email protected][email protected]@UAE_NXZ) 
1>opencv_highgui231d.lib(cap_vfw.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "protected: void __thiscall CvCaptureCAM_VFW::closeHIC(void)" ([email protected][email protected]@IAEXXZ) 
1>opencv_highgui231d.lib(cap_vfw.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "protected: void __thiscall CvCaptureCAM_VFW::closeHIC(void)" ([email protected][email protected]@IAEXXZ) 
1>opencv_highgui231d.lib(cap_vfw.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "public: virtual bool __thiscall CvCaptureCAM_VFW::open(int)" ([email protected][email protected]@[email protected]) 
1>opencv_highgui231d.lib(cap_vfw.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "public: virtual bool __thiscall CvCaptureCAM_VFW::open(int)" ([email protected][email protected]@[email protected]) 
1>opencv_highgui231d.lib(cap_vfw.obj) : error LNK2019: unresolved external symbol _ICDecompress referenced in function "public: virtual struct _IplImage * __thiscall CvCaptureCAM_VFW::retrieveFrame(int)" ([email protected][email protected]@[email protected]@[email protected]) 
1>opencv_highgui231d.lib(cap_vfw.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "public: virtual struct _IplImage * __thiscall CvCaptureCAM_VFW::retrieveFrame(int)" ([email protected][email protected]@[email protected]@[email protected]) 
1>opencv_highgui231d.lib(cap_vfw.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "protected: bool __thiscall CvVideoWriter_VFW::createStreams(struct CvSize,bool)" ([email protected][email protected]@[email protected]@[email protected]) 
1>opencv_highgui231d.lib(cap_vfw.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "protected: bool __thiscall CvVideoWriter_VFW::createStreams(struct CvSize,bool)" ([email protected][email protected]@[email protected]@[email protected]) 
1>opencv_highgui231d.lib(cap_vfw.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "protected: bool __thiscall CvVideoWriter_VFW::createStreams(struct CvSize,bool)" ([email protected][email protected]@[email protected]@[email protected]) 
1>opencv_highgui231d.lib(cap_vfw.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "protected: bool __thiscall CvVideoWriter_VFW::createStreams(struct CvSize,bool)" ([email protected][email protected]@[email protected]@[email protected]) 
1>opencv_highgui231d.lib(cap_vfw.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function "public: virtual bool __thiscall CvVideoWriter_VFW::writeFrame(struct _IplImage const *)" ([email protected][email protected]@[email protected]@@Z) 
1>opencv_highgui231d.lib(grfmt_jpeg2000.obj) : error LNK2019: unresolved external symbol _jas_image_destroy referenced in function "public: void __thiscall cv::Jpeg2KDecoder::close(void)" ([email protected]@[email protected]@QAEXXZ) 
1>opencv_highgui231d.lib(grfmt_jpeg2000.obj) : error LNK2019: unresolved external symbol _jas_stream_close referenced in function "public: void __thiscall cv::Jpeg2KDecoder::close(void)" ([email protected]@[email protected]@QAEXXZ) 
1>opencv_highgui231d.lib(grfmt_jpeg2000.obj) : error LNK2019: unresolved external symbol _jas_image_decode referenced in function "public: virtual bool __thiscall cv::Jpeg2KDecoder::readHeader(void)" ([email protected]@[email protected]@UAE_NXZ) 
1>opencv_highgui231d.lib(grfmt_jpeg2000.obj) : error LNK2019: unresolved external symbol _jas_stream_fopen referenced in function "public: virtual bool __thiscall cv::Jpeg2KDecoder::readHeader(void)" ([email protected]@[email protected]@UAE_NXZ) 
1>opencv_highgui231d.lib(grfmt_jpeg2000.obj) : error LNK2019: unresolved external symbol _jas_matrix_destroy referenced in function "public: virtual bool __thiscall cv::Jpeg2KDecoder::readData(class cv::Mat &)" ([email protected]@[email protected]@[email protected]@@Z) 
1>opencv_highgui231d.lib(grfmt_jpeg2000.obj) : error LNK2019: unresolved external symbol _jas_image_readcmpt referenced in function "public: virtual bool __thiscall cv::Jpeg2KDecoder::readData(class cv::Mat &)" ([email protected]@[email protected]@[email protected]@@Z) 
1>opencv_highgui231d.lib(grfmt_jpeg2000.obj) : error LNK2019: unresolved external symbol _jas_matrix_create referenced in function "public: virtual bool __thiscall cv::Jpeg2KDecoder::readData(class cv::Mat &)" ([email protected]@[email protected]@[email protected]@@Z) 
1>opencv_highgui231d.lib(grfmt_jpeg2000.obj) : error LNK2019: unresolved external symbol _jas_image_getcmptbytype referenced in function "public: virtual bool __thiscall cv::Jpeg2KDecoder::readData(class cv::Mat &)" ([email protected]@[email protected]@[email protected]@@Z) 
1>opencv_highgui231d.lib(grfmt_jpeg2000.obj) : error LNK2019: unresolved external symbol _jas_cmprof_destroy referenced in function "public: virtual bool __thiscall cv::Jpeg2KDecoder::readData(class cv::Mat &)" ([email protected]@[email protected]@[email protected]@@Z) 
1>opencv_highgui231d.lib(grfmt_jpeg2000.obj) : error LNK2019: unresolved external symbol _jas_image_chclrspc referenced in function "public: virtual bool __thiscall cv::Jpeg2KDecoder::readData(class cv::Mat &)" ([email protected]@[email protected]@[email protected]@@Z) 
1>opencv_highgui231d.lib(grfmt_jpeg2000.obj) : error LNK2019: unresolved external symbol _jas_cmprof_createfromclrspc referenced in function "public: virtual bool __thiscall cv::Jpeg2KDecoder::readData(class cv::Mat &)" ([email protected]@[email protected]@[email protected]@@Z) 
1>opencv_highgui231d.lib(grfmt_jpeg2000.obj) : error LNK2019: unresolved external symbol _jas_image_encode referenced in function "public: virtual bool __thiscall cv::Jpeg2KEncoder::write(class cv::Mat const &,class std::vector<int,class std::allocator<int> > const &)" ([email protected]@[email protected]@[email protected]@[email protected][email protected]@[email protected]@@[email protected]@@Z) 
1>opencv_highgui231d.lib(grfmt_jpeg2000.obj) : error LNK2019: unresolved external symbol _jas_image_strtofmt referenced in function "public: virtual bool __thiscall cv::Jpeg2KEncoder::write(class cv::Mat const &,class std::vector<int,class std::allocator<int> > const &)" ([email protected]@[email protected]@[email protected]@[email protected][email protected]@[email protected]@@[email protected]@@Z) 
1>opencv_highgui231d.lib(grfmt_jpeg2000.obj) : error LNK2019: unresolved external symbol _jas_image_create referenced in function "public: virtual bool __thiscall cv::Jpeg2KEncoder::write(class cv::Mat const &,class std::vector<int,class std::allocator<int> > const &)" ([email protected]@[email protected]@[email protected]@[email protected][email protected]@[email protected]@@[email protected]@@Z) 
1>opencv_highgui231d.lib(grfmt_jpeg2000.obj) : error LNK2019: unresolved external symbol _jas_image_writecmpt referenced in function "protected: bool __thiscall cv::Jpeg2KEncoder::writeComponent8u(void *,class cv::Mat const &)" ([email protected]@[email protected]@[email protected]@@Z) 
1>opencv_highgui231d.lib(grfmt_jpeg2000.obj) : error LNK2019: unresolved external symbol _jas_init referenced in function "public: __thiscall cv::JasperInitializer::JasperInitializer(void)" ([email protected]@@[email protected]) 
1>opencv_highgui231d.lib(grfmt_jpeg2000.obj) : error LNK2019: unresolved external symbol _jas_cleanup referenced in function "public: __thiscall cv::JasperInitializer::~JasperInitializer(void)" ([email protected]@@[email protected]) 
1>opencv_highgui231d.lib(grfmt_png.obj) : error LNK2019: unresolved external symbol _png_destroy_read_struct referenced in function "public: void __thiscall cv::PngDecoder::close(void)" ([email protected]@[email protected]@QAEXXZ) 
1>opencv_highgui231d.lib(grfmt_png.obj) : error LNK2019: unresolved external symbol _png_error referenced in function "protected: static void __cdecl cv::PngDecoder::readDataFromBuf(void *,unsigned char *,unsigned int)" ([email protected]@[email protected]@[email protected]) 
1>opencv_highgui231d.lib(grfmt_png.obj) : error LNK2019: unresolved external symbol _png_get_io_ptr referenced in function "protected: static void __cdecl cv::PngDecoder::readDataFromBuf(void *,unsigned char *,unsigned int)" ([email protected]@[email protected]@[email protected]) 
1>opencv_highgui231d.lib(grfmt_png.obj) : error LNK2019: unresolved external symbol _png_get_IHDR referenced in function "public: virtual bool __thiscall cv::PngDecoder::readHeader(void)" ([email protected]@[email protected]@UAE_NXZ) 
1>opencv_highgui231d.lib(grfmt_png.obj) : error LNK2019: unresolved external symbol _png_read_info referenced in function "public: virtual bool __thiscall cv::PngDecoder::readHeader(void)" ([email protected]@[email protected]@UAE_NXZ) 
1>opencv_highgui231d.lib(grfmt_png.obj) : error LNK2019: unresolved external symbol _png_init_io referenced in function "public: virtual bool __thiscall cv::PngDecoder::readHeader(void)" ([email protected]@[email protected]@UAE_NXZ) 
1>opencv_highgui231d.lib(grfmt_png.obj) : error LNK2019: unresolved external symbol _png_set_read_fn referenced in function "public: virtual bool __thiscall cv::PngDecoder::readHeader(void)" ([email protected]@[email protected]@UAE_NXZ) 
1>opencv_highgui231d.lib(grfmt_png.obj) : error LNK2019: unresolved external symbol _png_set_longjmp_fn referenced in function "public: virtual bool __thiscall cv::PngDecoder::readHeader(void)" ([email protected]@[email protected]@UAE_NXZ) 
1>opencv_highgui231d.lib(grfmt_png.obj) : error LNK2019: unresolved external symbol _png_create_info_struct referenced in function "public: virtual bool __thiscall cv::PngDecoder::readHeader(void)" ([email protected]@[email protected]@UAE_NXZ) 
1>opencv_highgui231d.lib(grfmt_png.obj) : error LNK2019: unresolved external symbol _png_create_read_struct referenced in function "public: virtual bool __thiscall cv::PngDecoder::readHeader(void)" (?readHead[email protected]@[email protected]@UAE_NXZ) 
1>opencv_highgui231d.lib(grfmt_png.obj) : error LNK2019: unresolved external symbol _png_read_end referenced in function "public: virtual bool __thiscall cv::PngDecoder::readData(class cv::Mat &)" ([email protected]@[email protected]@[email protected]@@Z) 
1>opencv_highgui231d.lib(grfmt_png.obj) : error LNK2019: unresolved external symbol _png_read_image referenced in function "public: virtual bool __thiscall cv::PngDecoder::readData(class cv::Mat &)" ([email protected]@[email protected]@[email protected]@@Z) 
1>opencv_highgui231d.lib(grfmt_png.obj) : error LNK2019: unresolved external symbol _png_read_update_info referenced in function "public: virtual bool __thiscall cv::PngDecoder::readData(class cv::Mat &)" ([email protected]@[email protected]@[email protected]@@Z) 
1>opencv_highgui231d.lib(grfmt_png.obj) : error LNK2019: unresolved external symbol _png_set_rgb_to_gray referenced in function "public: virtual bool __thiscall cv::PngDecoder::readData(class cv::Mat &)" ([email protected]@[email protected]@[email protected]@@Z) 
1>opencv_highgui231d.lib(grfmt_png.obj) : error LNK2019: unresolved external symbol _png_set_gray_to_rgb referenced in function "public: virtual bool __thiscall cv::PngDecoder::readData(class cv::Mat &)" ([email protected]@[email protected]@[email protected]@@Z) 
1>opencv_highgui231d.lib(grfmt_png.obj) : error LNK2019: unresolved external symbol _png_set_bgr referenced in function "public: virtual bool __thiscall cv::PngDecoder::readData(class cv::Mat &)" ([email protected]@[email protected]@[email protected]@@Z) 
1>opencv_highgui231d.lib(grfmt_png.obj) : error LNK2019: unresolved external symbol _png_set_expand_gray_1_2_4_to_8 referenced in function "public: virtual bool __thiscall cv::PngDecoder::readData(class cv::Mat &)" ([email protected]@[email protected]@[email protected]@@Z) 
1>opencv_highgui231d.lib(grfmt_png.obj) : error LNK2019: unresolved external symbol _png_set_palette_to_rgb referenced in function "public: virtual bool __thiscall cv::PngDecoder::readData(class cv::Mat &)" ([email protected]@[email protected]@[email protected]@@Z) 
1>opencv_highgui231d.lib(grfmt_png.obj) : error LNK2019: unresolved external symbol _png_set_strip_alpha referenced in function "public: virtual bool __thiscall cv::PngDecoder::readData(class cv::Mat &)" ([email protected]@[email protected]@[email protected]@@Z) 
1>opencv_highgui231d.lib(grfmt_png.obj) : error LNK2019: unresolved external symbol _png_set_swap referenced in function "public: virtual bool __thiscall cv::PngDecoder::readData(class cv::Mat &)" ([email protected]@[email protected]@[email protected]@@Z) 
1>opencv_highgui231d.lib(grfmt_png.obj) : error LNK2019: unresolved external symbol _png_set_strip_16 referenced in function "public: virtual bool __thiscall cv::PngDecoder::readData(class cv::Mat &)" ([email protected]@[email protected]@[email protected]@@Z) 
1>opencv_highgui231d.lib(grfmt_png.obj) : error LNK2019: unresolved external symbol _png_destroy_write_struct referenced in function "public: virtual bool __thiscall cv::PngEncoder::write(class cv::Mat const &,class std::vector<int,class std::allocator<int> > const &)" ([email protected]@[email protected]@[email protected]@[email protected][email protected]@[email protected]@@[email protected]@@Z) 
1>opencv_highgui231d.lib(grfmt_png.obj) : error LNK2019: unresolved external symbol _png_write_end referenced in function "public: virtual bool __thiscall cv::PngEncoder::write(class cv::Mat const &,class std::vector<int,class std::allocator<int> > const &)" ([email protected]@[email protected]@[email protected]@[email protected][email protected]@[email protected]@@[email protected]@@Z) 
1>opencv_highgui231d.lib(grfmt_png.obj) : error LNK2019: unresolved external symbol _png_write_image referenced in function "public: virtual bool __thiscall cv::PngEncoder::write(class cv::Mat const &,class std::vector<int,class std::allocator<int> > const &)" ([email protected]@[email protected]@[email protected]@[email protected][email protected]@[email protected]@@[email protected]@@Z) 
1>opencv_highgui231d.lib(grfmt_png.obj) : error LNK2019: unresolved external symbol _png_write_info referenced in function "public: virtual bool __thiscall cv::PngEncoder::write(class cv::Mat const &,class std::vector<int,class std::allocator<int> > const &)" ([email protected]@[email protected]@[email protected]@[email protected][email protected]@[email protected]@@[email protected]@@Z) 
1>opencv_highgui231d.lib(grfmt_png.obj) : error LNK2019: unresolved external symbol _png_set_IHDR referenced in function "public: virtual bool __thiscall cv::PngEncoder::write(class cv::Mat const &,class std::vector<int,class std::allocator<int> > const &)" ([email protected]@[email protected]@[email protected]@[email protected][email protected]@[email protected]@@[email protected]@@Z) 
1>opencv_highgui231d.lib(grfmt_png.obj) : error LNK2019: unresolved external symbol _png_set_compression_strategy referenced in function "public: virtual bool __thiscall cv::PngEncoder::write(class cv::Mat const &,class std::vector<int,class std::allocator<int> > const &)" ([email protected]@[email protected]@[email protected]@[email protected][email protected]@[email protected]@@[email protected]@@Z) 
1>opencv_highgui231d.lib(grfmt_png.obj) : error LNK2019: unresolved external symbol _png_set_compression_level referenced in function "public: virtual bool __thiscall cv::PngEncoder::write(class cv::Mat const &,class std::vector<int,class std::allocator<int> > const &)" ([email protected]@[email protected]@[email protected]@[email protected][email protected]@[email protected]@@[email protected]@@Z) 
1>opencv_highgui231d.lib(grfmt_png.obj) : error LNK2019: unresolved external symbol _png_set_filter referenced in function "public: virtual bool __thiscall cv::PngEncoder::write(class cv::Mat const &,class std::vector<int,class std::allocator<int> > const &)" ([email protected]@[email protected]@[email protected]@[email protected][email protected]@[email protected]@@[email protected]@@Z) 
1>opencv_highgui231d.lib(grfmt_png.obj) : error LNK2019: unresolved external symbol _png_set_compression_mem_level referenced in function "public: virtual bool __thiscall cv::PngEncoder::write(class cv::Mat const &,class std::vector<int,class std::allocator<int> > const &)" ([email protected]@[email protected]@[email protected]@[email protected][email protected]@[email protected]@@[email protected]@@Z) 
1>opencv_highgui231d.lib(grfmt_png.obj) : error LNK2019: unresolved external symbol _png_set_write_fn referenced in function "public: virtual bool __thiscall cv::PngEncoder::write(class cv::Mat const &,class std::vector<int,class std::allocator<int> > const &)" ([email protected]@[email protected]@[email protected]@[email protected][email protected]@[email protected]@@[email protected]@@Z) 
1>opencv_highgui231d.lib(grfmt_png.obj) : error LNK2019: unresolved external symbol _png_create_write_struct referenced in function "public: virtual bool __thiscall cv::PngEncoder::write(class cv::Mat const &,class std::vector<int,class std::allocator<int> > const &)" ([email protected]@[email protected]@[email protected]@[email protected][email protected]@[email protected]@@[email protected]@@Z) 
1>opencv_highgui231d.lib(grfmt_tiff.obj) : error LNK2019: unresolved external symbol _TIFFSetWarningHandler referenced in function "public: __thiscall cv::TiffDecoder::TiffDecoder(void)" ([email protected]@@[email protected]) 
1>opencv_highgui231d.lib(grfmt_tiff.obj) : error LNK2019: unresolved external symbol _TIFFSetErrorHandler referenced in function "public: __thiscall cv::TiffDecoder::TiffDecoder(void)" ([email protected]@@[email protected]) 
1>opencv_highgui231d.lib(grfmt_tiff.obj) : error LNK2019: unresolved external symbol _TIFFClose referenced in function "public: void __thiscall cv::TiffDecoder::close(void)" ([email protected]@[email protected]@QAEXXZ) 
1>opencv_highgui231d.lib(grfmt_tiff.obj) : error LNK2019: unresolved external symbol _TIFFGetField referenced in function "public: virtual bool __thiscall cv::TiffDecoder::readHeader(void)" ([email protected]@[email protected]@UAE_NXZ) 
1>opencv_highgui231d.lib(grfmt_tiff.obj) : error LNK2019: unresolved external symbol _TIFFOpen referenced in function "public: virtual bool __thiscall cv::TiffDecoder::readHeader(void)" ([email protected]@[email protected]@UAE_NXZ) 
1>opencv_highgui231d.lib(grfmt_tiff.obj) : error LNK2019: unresolved external symbol _TIFFReadEncodedTile referenced in function "public: virtual bool __thiscall cv::TiffDecoder::readData(class cv::Mat &)" ([email protected]@[email protected]@[email protected]@@Z) 
1>opencv_highgui231d.lib(grfmt_tiff.obj) : error LNK2019: unresolved external symbol _TIFFReadEncodedStrip referenced in function "public: virtual bool __thiscall cv::TiffDecoder::readData(class cv::Mat &)" ([email protected]@[email protected]@[email protected]@@Z) 
1>opencv_highgui231d.lib(grfmt_tiff.obj) : error LNK2019: unresolved external symbol _TIFFReadRGBATile referenced in function "public: virtual bool __thiscall cv::TiffDecoder::readData(class cv::Mat &)" ([email protected]@[email protected]@[email protected]@@Z) 
1>opencv_highgui231d.lib(grfmt_tiff.obj) : error LNK2019: unresolved external symbol _TIFFReadRGBAStrip referenced in function "public: virtual bool __thiscall cv::TiffDecoder::readData(class cv::Mat &)" ([email protected]@[email protected]@[email protected]@@Z) 
1>opencv_highgui231d.lib(grfmt_tiff.obj) : error LNK2019: unresolved external symbol _TIFFRGBAImageOK referenced in function "public: virtual bool __thiscall cv::TiffDecoder::readData(class cv::Mat &)" ([email protected]@[email protected]@[email protected]@@Z) 
1>opencv_highgui231d.lib(grfmt_tiff.obj) : error LNK2019: unresolved external symbol _TIFFIsTiled referenced in function "public: virtual bool __thiscall cv::TiffDecoder::readData(class cv::Mat &)" ([email protected]@[email protected]@[email protected]@@Z) 
1>opencv_highgui231d.lib(grfmt_tiff.obj) : error LNK2019: unresolved external symbol _TIFFWriteScanline referenced in function "protected: bool __thiscall cv::TiffEncoder::writeLibTiff(class cv::Mat const &,class std::vector<int,class std::allocator<int> > const &)" ([email protected]@[email protected]@[email protected]@[email protected][email protected]@[email protected]@@[email protected]@@Z) 
1>opencv_highgui231d.lib(grfmt_tiff.obj) : error LNK2019: unresolved external symbol _TIFFScanlineSize referenced in function "protected: bool __thiscall cv::TiffEncoder::writeLibTiff(class cv::Mat const &,class std::vector<int,class std::allocator<int> > const &)" ([email protected]@[email protected]@[email protected]@[email protected][email protected]@[email protected]@@[email protected]@@Z) 
1>opencv_highgui231d.lib(grfmt_tiff.obj) : error LNK2019: unresolved external symbol _TIFFSetField referenced in function "protected: bool __thiscall cv::TiffEncoder::writeLibTiff(class cv::Mat const &,class std::vector<int,class std::allocator<int> > const &)" ([email protected]@[email protected]@[email protected]@[email protected][email protected]@[email protected]@@[email protected]@@Z) 
1>opencv_highgui231d.lib(grfmt_jpeg.obj) : error LNK2019: unresolved external symbol _jpeg_resync_to_restart referenced in function "void __cdecl cv::jpeg_buffer_src(struct jpeg_decompress_struct *,struct cv::JpegSource *)" ([email protected]@@[email protected]@[email protected]@@Z) 
1>opencv_highgui231d.lib(grfmt_jpeg.obj) : error LNK2019: unresolved external symbol _jpeg_destroy_decompress referenced in function "public: void __thiscall cv::JpegDecoder::close(void)" ([email protected]@[email protected]@QAEXXZ) 
1>opencv_highgui231d.lib(grfmt_jpeg.obj) : error LNK2019: unresolved external symbol _jpeg_read_header referenced in function "public: virtual bool __thiscall cv::JpegDecoder::readHeader(void)" ([email protected]@[email protected]@UAE_NXZ) 
1>opencv_highgui231d.lib(grfmt_jpeg.obj) : error LNK2019: unresolved external symbol _jpeg_stdio_src referenced in function "public: virtual bool __thiscall cv::JpegDecoder::readHeader(void)" ([email protected]@[email protected]@UAE_NXZ) 
1>opencv_highgui231d.lib(grfmt_jpeg.obj) : error LNK2019: unresolved external symbol _jpeg_CreateDecompress referenced in function "public: virtual bool __thiscall cv::JpegDecoder::readHeader(void)" ([email protected]@[email protected]@UAE_NXZ) 
1>opencv_highgui231d.lib(grfmt_jpeg.obj) : error LNK2019: unresolved external symbol _jpeg_std_error referenced in function "public: virtual bool __thiscall cv::JpegDecoder::readHeader(void)" ([email protected]@[email protected]@UAE_NXZ) 
1>opencv_highgui231d.lib(grfmt_jpeg.obj) : error LNK2019: unresolved external symbol _jpeg_finish_decompress referenced in function "public: virtual bool __thiscall cv::JpegDecoder::readData(class cv::Mat &)" ([email protected]@[email protected]@[email protected]@@Z) 
1>opencv_highgui231d.lib(grfmt_jpeg.obj) : error LNK2019: unresolved external symbol _jpeg_read_scanlines referenced in function "public: virtual bool __thiscall cv::JpegDecoder::readData(class cv::Mat &)" ([email protected]@[email protected]@[email protected]@@Z) 
1>opencv_highgui231d.lib(grfmt_jpeg.obj) : error LNK2019: unresolved external symbol _jpeg_start_decompress referenced in function "public: virtual bool __thiscall cv::JpegDecoder::readData(class cv::Mat &)" ([email protected]@[email protected]@[email protected]@@Z) 
1>opencv_highgui231d.lib(grfmt_jpeg.obj) : error LNK2019: unresolved external symbol _jpeg_alloc_huff_table referenced in function "int __cdecl cv::my_jpeg_load_dht(struct jpeg_decompress_struct *,unsigned char *,struct JHUFF_TBL * * const,struct JHUFF_TBL * * const)" ([email protected]@@[email protected]@[email protected]@[email protected]) 
1>opencv_highgui231d.lib(grfmt_jpeg.obj) : error LNK2019: unresolved external symbol _jpeg_destroy_compress referenced in function "public: virtual bool __thiscall cv::JpegEncoder::write(class cv::Mat const &,class std::vector<int,class std::allocator<int> > const &)" ([email protected]@[email protected]@[email protected]@[email protected][email protected]@[email protected]@@[email protected]@@Z) 
1>opencv_highgui231d.lib(grfmt_jpeg.obj) : error LNK2019: unresolved external symbol _jpeg_finish_compress referenced in function "public: virtual bool __thiscall cv::JpegEncoder::write(class cv::Mat const &,class std::vector<int,class std::allocator<int> > const &)" ([email protected]@[email protected]@[email protected]@[email protected][email protected]@[email protected]@@[email protected]@@Z) 
1>opencv_highgui231d.lib(grfmt_jpeg.obj) : error LNK2019: unresolved external symbol _jpeg_write_scanlines referenced in function "public: virtual bool __thiscall cv::JpegEncoder::write(class cv::Mat const &,class std::vector<int,class std::allocator<int> > const &)" ([email protected]@[email protected]@[email protected]@[email protected][email protected]@[email protected]@@[email protected]@@Z) 
1>opencv_highgui231d.lib(grfmt_jpeg.obj) : error LNK2019: unresolved external symbol _jpeg_start_compress referenced in function "public: virtual bool __thiscall cv::JpegEncoder::write(class cv::Mat const &,class std::vector<int,class std::allocator<int> > const &)" ([email protected]@[email protected]@[email protected]@[email protected][email protected]@[email protected]@@[email protected]@@Z) 
1>opencv_highgui231d.lib(grfmt_jpeg.obj) : error LNK2019: unresolved external symbol _jpeg_set_quality referenced in function "public: virtual bool __thiscall cv::JpegEncoder::write(class cv::Mat const &,class std::vector<int,class std::allocator<int> > const &)" ([email protected]@[email protected]@[email protected]@[email protected][email protected]@[email protected]@@[email protected]@@Z) 
1>opencv_highgui231d.lib(grfmt_jpeg.obj) : error LNK2019: unresolved external symbol _jpeg_set_defaults referenced in function "public: virtual bool __thiscall cv::JpegEncoder::write(class cv::Mat const &,class std::vector<int,class std::allocator<int> > const &)" ([email protected]@[email protected]@[email protected]@[email protected][email protected]@[email protected]@@[email protected]@@Z) 
1>opencv_highgui231d.lib(grfmt_jpeg.obj) : error LNK2019: unresolved external symbol _jpeg_stdio_dest referenced in function "public: virtual bool __thiscall cv::JpegEncoder::write(class cv::Mat const &,class std::vector<int,class std::allocator<int> > const &)" ([email protected]@[email protected]@[email protected]@[email protected][email protected]@[email protected]@@[email protected]@@Z) 
1>opencv_highgui231d.lib(grfmt_jpeg.obj) : error LNK2019: unresolved external symbol _jpeg_CreateCompress referenced in function "public: virtual bool __thiscall cv::JpegEncoder::write(class cv::Mat const &,class std::vector<int,class std::allocator<int> > const &)" ([email protected]@[email protected]@[email protected]@[email protected][email protected]@[email protected]@@[email protected]@@Z) 
1>D:\work\SimCapture\OpenCVTest\Debug\OpenCVTest.exe : fatal error LNK1120: 108 unresolved externals 

Trả lời

2

Có một số thư mục tĩnh bị thiếu trong gói OpenCV 2.3.1 Windows. Các thư viện này thường được xây dựng như một phần của thư viện OpenCV và bạn không cần phải cài đặt riêng chúng. Vì vậy, bạn có thể tự mình xây dựng OpenCV từ các nguồn hoặc sử dụng các thư viện động từ gói.

+0

Vì vậy, các tùy chọn duy nhất của tôi là tự xây dựng lại nguồn hoặc sử dụng thư viện động? Không có cách nào tôi có thể sử dụng các thư viện tĩnh được xây dựng sẵn mà không cần tìm kiếm các phụ thuộc? –

+1

Tất nhiên, Andrey hoàn toàn sai. –

5

các _avi * những người rõ ràng có thể được tìm thấy bằng cách liên kết ("bổ sung phụ thuộc") chống lại vfw32.lib

+0

Cảm ơn bạn rất nhiều! –

2

Tôi nghĩ rằng bạn phải sử dụng tùy chọn "Sử dụng MFC trong một thư viện tĩnh" để làm cho nó làm việc với tĩnh thư viện.

+3

Tại sao bạn nói về MFC? –

3

Đối với 6 lỗi đầu tiên (_gzputs, v.v.), bạn nên thêm zlib.lib (hoặc zlibd.lib trong cấu hình Debug) vào đầu vào trình liên kết của bạn.

15

Tôi có một bản dựng tĩnh của OpenCV với hầu hết các chuông và còi. VC10 OpenCV2.4.9 (OCl woo) Để khắc phục một vấn đề rất giống tôi chỉ liên quan đến tất cả các nội dung sau:

libpng.lib 
libtiff.lib 
zlib.lib 
IlmImf.lib 
libjasper.lib 
libjpeg.lib 

Họ bên trong C: \ Lib \ opencv249 \ OpenCV \ bld32 \ 3rdparty \ lib \ Thả

-Không chắc chắn cái nào đã làm nhưng cái quái gì. Cảm ơn Loozie!

PK

+0

thx. giải quyết các vấn đề liên kết. tôi tìm thấy các libs trong distrib của tôi (2.4.8) cũng trong thư mục staticlib (build/x86/v12/staticlib) –

+1

'$ (SolutionDir) opencv-build \ 3rdparty \ lib \ Debug' – FelikZ

11

biểu tượng _ imp _CreateToolbarEx @ 52 được tham chiếu trong chức năng "int __cdecl icvCreateTrackbar (const char *, const char *, int *, int, void (__cdecl *) (int), void (__cdecl *) (int, void *), void *) "(? icvCreateTrackbar @@ YAHPBD0PAHHP6AXH @ ZP6AXHPAX @ Z3 @ Z)

thêm comctl32.lib vào đầu vào liên kết của bạn.

nhưng sau khi thêm tất cả điều này tôi vẫn còn có rất nhiều lỗi liên kết không biết tại sao ...

như

higui.lib (window_w32.obj), _imp_getDCOrfEx @ 8

higui .lib (window_w32.obj), _imp_getClipBox @ 8

vấn đề được giải quyết.

chỉ cần thêm Gdi32.lib và dự án của tôi hoạt động tốt.

để kết luận:

1. xây dựng lib tĩnh của riêng bạn với cmake.

Cũng nên thêm libs của bên thứ ba.

3.sửa sổ libs như comctl32.lib, gdi32.lib cũng nên được thêm vào.

4.kiểm tra cẩn thận liệu libs (thứ 3) có tuân thủ/tâm trạng MTD hay không. Tôi đã thấy các vấn đề LIBCMT.lib và MSVCRT.lib.

chúc may mắn.

8

Giành một số trong những câu trả lời khác mà tôi cần thiết để có được điều này để làm việc, tôi cần phải bao gồm danh sách này hoàn toàn trong Linker >> Input >> Dependencies bổ sung:

opencv_core248d.lib 
opencv_imgproc248d.lib 
opencv_highgui248d.lib 
opencv_ml248d.lib 
opencv_video248d.lib 
opencv_features2d248d.lib 
opencv_calib3d248d.lib 
opencv_objdetect248d.lib 
opencv_contrib248d.lib 
opencv_legacy248d.lib 
opencv_flann248d.lib 
libpngd.lib 
libtiffd.lib 
zlibd.lib 
IlmImfd.lib 
libjasperd.lib 
libjpegd.lib 
comctl32.lib 
gdi32.lib 
vfw32.lib 

sau khi đảm bảo rằng Runtime của dự án Thư viện được đặt thành tùy chọn/MTd.

này là dành cho Visual Studio 2013

+0

Điều này mang đến kết thúc của 4 giờ đấu tranh, Cảm ơn bạn! – MichaelB

1

Tôi có một vấn đề tương tự với opencv mới nhất được xây dựng với Vs 2015 x64,

nhưng sau khi tôi thêm các thư viện của bên thứ ba (ở bên thứ 3/thư viện/Debug hoặc phát hành) , các vấn đề đã được giải quyết.

IlmImfd.lib 
libjasperd.lib 
libjpegd.lib 
libpngd.lib 
libtiffd.lib 
libwebpd.lib 
zlibd.lib 
Các vấn đề liên quan