编译Multiblend时出错:“缺少jpeg_set_quality函数”

时间:2018-09-21 17:48:19

标签: c++ compilation jpeg

我在Mac上下载了multiblend,并使用其“ build.txt”文件中提供的命令对其进行了编译:

    g++ -msse2 -O3 -ltiff -ltiffxx -ljpeg -lpng multiblend.cpp -o multiblend

但是,我总是遇到以下错误:

In file included from multiblend.cpp:51:
./loadimages.cpp:21:11: warning: comparison of unsigned expression >= 0 is
      always true [-Wtautological-compare]
  while (p>=0) {
         ~^ ~
./loadimages.cpp:67:11: warning: comparison of unsigned expression >= 0 is
      always true [-Wtautological-compare]
  while (p>=0) {
         ~^ ~
In file included from multiblend.cpp:55:
./write.cpp:26:2: error: no matching function for call to 'jpeg_set_quality'
        jpeg_set_quality(&cinfo,g_jpegquality,true);
        ^~~~~~~~~~~~~~~~
/usr/local/include/jpeglib.h:991:14: note: candidate function not viable: no
      known conversion from 'bool' to 'boolean' for 3rd argument
EXTERN(void) jpeg_set_quality JPP((j_compress_ptr cinfo, int quality,
             ^
In file included from multiblend.cpp:55:
./write.cpp:27:2: error: no matching function for call to 'jpeg_start_compress'
        jpeg_start_compress(&cinfo,true);
        ^~~~~~~~~~~~~~~~~~~
/usr/local/include/jpeglib.h:1010:14: note: candidate function not viable: no
      known conversion from 'bool' to 'boolean' for 2nd argument
EXTERN(void) jpeg_start_compress JPP((j_compress_ptr cinfo,
             ^
2 warnings and 2 errors generated.

我检查了函数jpeg_set_qualityjpeg_start_compress都是库jpeglib.h,它包含在多混合文件中:#include <jpeglib.h>

那我该如何纠正呢?

0 个答案:

没有答案