我如何使用jpeg_mem_src,jpeg_mem_dest在libjpeg-turbo? [英] how can i use jpeg_mem_src, jpeg_mem_dest in libjpeg-turbo?
问题描述
libjpeg8 include是这两个函数,但在libjpeg-turbo中有以下内容:
libjpeg8 include are those two functions, but in libjpeg-turbo has the following:
//jconfig.h
#define JPEG_LIB_VERSION 62
...
//jpeglib.h
#if JPEG_LIB_VERSION >= 80
/* Data source and destination managers: memory buffers. */
EXTERN(void) jpeg_mem_dest JPP((j_compress_ptr cinfo,
unsigned char ** outbuffer,
unsigned long * outsize));
EXTERN(void) jpeg_mem_src JPP((j_decompress_ptr cinfo,
unsigned char * inbuffer,
unsigned long insize));
#endif
如果我尝试使用JPEG_LIB_VERSION 80 :
if i try to use "JPEG_LIB_VERSION 80" i'll get the following:
错误LNK2019:未解析的外部符号_jpeg_mem_src在函数...中引用
error LNK2019: unresolved external symbol _jpeg_mem_src referenced in function ...
所以,如果可能,我如何使用这些功能?我需要编译libjpeg-turbo的一些包吗?
so, how can i use those functions if it possible? do i need compile some package of libjpeg-turbo?
推荐答案
预编译的.lib和.dll文件只支持版本6功能。你需要编译自己的库。将 -DWITH_JPEG8 = 1
标志传递给CMake以获取这两个函数。
The precompiled .lib and .dll files only support the version 6 functions. You need to compile your own library. Pass the -DWITH_JPEG8=1
flag to CMake to get those two functions.
这篇关于我如何使用jpeg_mem_src,jpeg_mem_dest在libjpeg-turbo?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!