ndk编译ffmpeg 'lrint' follows non-static declaration 错误 解决方案

来源:互联网 发布:出租屋软件 编辑:程序博客网 时间:2024/05/22 05:19

编译时  ffmpeg0.6.6 出现下面错误


J:/android_project/ffmpeg/ffmpeg-0.6.6/jni/ffmpeg/libavformat/../libavutil/libm.h:62: error: static declaration of 'lrint' follows non-static declaration

J:/android_project/ffmpeg/ffmpeg-0.6.6/jni/ffmpeg/libavformat/../libavutil/libm.h:69: error: static declaration of 'lrintf' follows non-static declaration
J:/android_project/ffmpeg/ffmpeg-0.6.6/jni/ffmpeg/libavformat/../libavutil/libm.h:76: error: static declaration of 'round' follows non-static declaration
J:/android_project/ffmpeg/ffmpeg-0.6.6/jni/ffmpeg/libavformat/../libavutil/libm.h:83: error: static declaration of 'roundf' follows non-static declaration

J:/android_project/ffmpeg/ffmpeg-0.6.6/jni/ffmpeg/libavformat/../libavutil/libm.h:90: error: static declaration of 'truncf' follows non-static declaration


解决方法

打开  config.h 文件,查找  LRINT,将 0,改成1,示例

#define HAVE_LRINT 0

改成

#define HAVE_LRINT 1


分别查询 LRINT,ROUND,TRUNCF,进行相应的修改

原创粉丝点击