Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

libjpeg linker error with OpenCV 3.0.0 alpha on Win8, VS2012

Hello,

I have a very simple C++ application which reads an input JPEG image and uses some filter operations on it. The input image is read through cv::imread, which requires opencv_imgcodecs300 library. After some unresolved externals, this is the full list of the linker additional dependencies, VS2012: ippicvmt.lib libjpegd.lib libwebpd.lib zlibd.lib opencv_imgcodecs300d.lib (Without 'd' for Release mode).
"Additional library directories" refers to <opencv300 root="">\opencv\build\x86\vc11\staticlib However I still get the following linker error:

error LNK2019: unresolved external symbol _jpeg_default_qtables referenced in function "public: virtual bool __thiscall cv::JpegEncoder::write(class cv::Mat const &,class std::vector<int,class std::allocator<int> > const &)" (?write@JpegEncoder@cv@@UAE_NABVMat@2@ABV?$vector@HV?$allocator@H@std@@@std@@@Z)

It looks like _jpeg_default_qtables should belong to libjpeg, which is already linked...

Any other ideas?

Thanks!

libjpeg linker error with OpenCV 3.0.0 alpha on Win8, VS2012

Hello,

I have a very simple C++ application which reads an input JPEG image and uses some filter operations on it. The input image is read through cv::imread, which requires opencv_imgcodecs300 library. After some unresolved externals, this is the full list of the linker additional dependencies, VS2012: VS2012:

ippicvmt.lib
libjpegd.lib
libwebpd.lib
zlibd.lib
opencv_imgcodecs300d.lib

(Without 'd' for Release mode).
"Additional library directories" refers to <opencv300 root="">\opencv\build\x86\vc11\staticlib However I still get the following linker error:

error LNK2019: unresolved external symbol _jpeg_default_qtables _jpeg_default_qtables referenced in function "public: "public: virtual bool __thiscall __thiscall cv::JpegEncoder::write(class cv::Mat cv::Mat const &,class std::vector<int,class std::allocator<int> std::allocator<int=""> > const &)" (?write@JpegEncoder@cv@@UAE_NABVMat@2@ABV?$vector@HV?$allocator@H@std@@@std@@@Z)

&)" (?write@JpegEncoder@cv@@UAE_NABVMat@2@ABV?$vector@HV?$allocator@H@std@@@std@@@Z)

It looks like _jpeg_default_qtables should belong to libjpeg, which is already linked...

Any other ideas?

Thanks!