cygwin下ndk编译工程中使用ffmpeg时出现的错误:“error: undefined reference to 'av_register_all()'”

使用ffmpeg的源文件是  *.cpp 而且在已经引入了ffmpeg的相应的头文件。

所以解决方法:

extern "C"
{
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
}

------------------------------

即使用 extern "C" 限定 引入的ffmpeg的头文件。

 

参考:http://bbs.csdn.net/topics/390203566

posted on 2015-04-02 16:05  瓦楞球  阅读(2368)  评论(0编辑  收藏  举报