Question

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

if i try to use "JPEG_LIB_VERSION 80" i'll get the following:

error LNK2019: unresolved external symbol _jpeg_mem_src referenced in function ...

so, how can i use those functions if it possible? do i need compile some package of libjpeg-turbo?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top