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!
try changing the order of the libs. opencv_imgcodecs should go before its dependancies.
when doing dynamic linking, the order does not matter, total different thing with static linking.
@berak: Thanks, I tried - it doesn't help.