编译ffmpeg,死活不让过
本人大二学生,初次接触ffmpeg,MingW+MSYS配置完毕,按照wiki上编译到make命令时候死活不让通过.....
错误提示:
$ make install
CC /usr/local/lib/libavdevice.a
In file included from d:/ffmpeg/libavformat/avformat.h:55,
from d:/ffmpeg/libavdevice/alldevices.c:22:
D:\MingW\include/stdio.h:372: error: no previous prototype for 'getc'
D:\MingW\include/stdio.h:379: error: no previous prototype for 'putc'
D:\MingW\include/stdio.h:386: error: no previous prototype for 'getchar'
D:\MingW\include/stdio.h:393: error: no previous prototype for 'putchar'
D:\MingW\include/stdio.h:606: error: no previous prototype for 'vsnwprintf'
In file included from d:/ffmpeg/libavutil/common.h:31,
from d:/ffmpeg/libavutil/avutil.h:71,
from d:/ffmpeg/libavcodec/avcodec.h:30,
from d:/ffmpeg/libavformat/avformat.h:56,
from d:/ffmpeg/libavdevice/alldevices.c:22:
D:\MingW\include/inttypes.h:259: error: no previous prototype for 'imaxabs'
In file included from d:/ffmpeg/libavutil/common.h:33,
from d:/ffmpeg/libavutil/avutil.h:71,
from d:/ffmpeg/libavcodec/avcodec.h:30,
from d:/ffmpeg/libavformat/avformat.h:56,
from d:/ffmpeg/libavdevice/alldevices.c:22:
D:\MingW\include/math.h:357: error: no previous prototype for '__fpclassifyl'
D:\MingW\include/math.h:378: error: no previous prototype for '__isnan'
D:\MingW\include/math.h:387: error: no previous prototype for '__isnanf'
D:\MingW\include/math.h:396: error: no previous prototype for '__isnanl'
D:\MingW\include/math.h:413: error: no previous prototype for '__signbit'
D:\MingW\include/math.h:419: error: no previous prototype for '__signbitf'
D:\MingW\include/math.h:425: error: no previous prototype for '__signbitl'
D:\MingW\include/math.h:459: error: no previous prototype for 'sinhf'
D:\MingW\include/math.h:463: error: no previous prototype for 'coshf'
D:\MingW\include/math.h:467: error: no previous prototype for 'tanhf'
D:\MingW\include/math.h:489: error: no previous prototype for 'expf'
D:\MingW\include/math.h:505: error: no previous prototype for 'frexpf'
D:\MingW\include/math.h:517: error: no previous prototype for 'ldexpf'
D:\MingW\include/math.h:597: error: no previous prototype for 'hypotf'
D:\MingW\include/math.h:602: error: no previous prototype for 'powf'
make: *** [libavdevice/alldevices.o] Error 1
希望得到高人解决
[解决办法]
http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/105731
去掉configure 文件文件里的
check_cflags -Werror=missing-prototypes
原因是
ffmpeg 的 configure 文件,3.8号更新了 添加了 -Werror=missing-prototypes 这个编译选择项
Error on missing function prototypes with gcc
This makes it an error to not have a prototype in scope for
a function with external linkage. The flag is only enabled
for gcc due to -Werror=type not working with all compilers.
[解决办法]
-Werror=missing-prototypes
错误 的原因就是这个参数,
去掉configure 文件文件里的
带这个-Werror=missing-prototypes的行
重新运行
./configure --enable-memalign-hack
再make V=1
输出 里应该没有 -Werror=missing-prototypes 就会编译通过的