検索

ホームページ  >  に質問  >  本文

c++ - too many arguments to function ‘void jpeg_CreateCompress()’

库的编译是按照网上的通用方式编译的,测试代码文件名用c没有问题,使用cpp就存在问题。

使用jpeg库编译测试程序,出现如下错误:

/srv/opensource/robrain/image/src/Yuv2Jpeg.cpp: In function ‘int Image::Yuv422ToJpeg(unsigned char*, int, int, FILE*, int)’:
/srv/opensource/robrain/image/src/Yuv2Jpeg.cpp:184:37: error: too many arguments to function ‘jpeg_error_mgr* jpeg_std_error()’
In file included from /srv/opensource/robrain/image/src/Yuv2Jpeg.cpp:10:0:
/srv/opensource/robrain/opensource/prebuild/include/jpeg/jpeglib.h:884:33: note: declared here
/srv/opensource/robrain/image/src/Yuv2Jpeg.cpp:185:5: error: too many arguments to function ‘void jpeg_CreateCompress()’
In file included from /srv/opensource/robrain/image/src/Yuv2Jpeg.cpp:10:0:
/srv/opensource/robrain/opensource/prebuild/include/jpeg/jpeglib.h:900:14: note: declared here
/srv/opensource/robrain/image/src/Yuv2Jpeg.cpp:186:31: error: too many arguments to function ‘void jpeg_stdio_dest()’
In file included from /srv/opensource/robrain/image/src/Yuv2Jpeg.cpp:10:0:
/srv/opensource/robrain/opensource/prebuild/include/jpeg/jpeglib.h:910:14: note: declared here
/srv/opensource/robrain/image/src/Yuv2Jpeg.cpp:193:29: error: too many arguments to function ‘void jpeg_set_defaults()’
In file included from /srv/opensource/robrain/image/src/Yuv2Jpeg.cpp:10:0:
/srv/opensource/robrain/opensource/prebuild/include/jpeg/jpeglib.h:914:14: note: declared here
/srv/opensource/robrain/image/src/Yuv2Jpeg.cpp:194:40: error: too many arguments to function ‘void jpeg_set_quality()’
In file included from /srv/opensource/robrain/image/src/Yuv2Jpeg.cpp:10:0:
/srv/opensource/robrain/opensource/prebuild/include/jpeg/jpeglib.h:919:14: note: declared here
/srv/opensource/robrain/image/src/Yuv2Jpeg.cpp:201:34: error: too many arguments to function ‘void jpeg_start_compress()’
巴扎黑巴扎黑2807日前1568

全員に返信(4)返信します

  • 迷茫

    迷茫2017-04-17 14:45:53

    jpegsrc.v9b.tar.gz バージョンをダウンロードし、コンパイルしてテストしましたが、同様の問題は発生しませんでした。

    返事
    0
  • 高洛峰

    高洛峰2017-04-17 14:45:53

    パラメータが多すぎます。パラメータの問題

    返事
    0
  • 大家讲道理

    大家讲道理2017-04-17 14:45:53

    渡したパラメータが多すぎるのは明らかなエラーではないでしょうか?

    返事
    0
  • 阿神

    阿神2017-04-17 14:45:53

    関数パラメータが多すぎます

    返事
    0
  • キャンセル返事