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

查看:498
本文介绍了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()’

解决方案

下载了jpegsrc.v9b.tar.gz这个版本编译、测试,没有遇到类似的问题。

这篇关于c++ - too many arguments to function ‘void jpeg_CreateCompress()’的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆