天天看點

ndk編譯ffmpeg 'lrint' follows non-static declaration 錯誤 解決方案

編譯時  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,進行相應的修改