环境ubuntu11.10
最新ffmpeg代码
svn co svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
./configure --enable-shared --enable-pthreads --disable-yasm
make && make install
安装了zlib1g-dev,libbz2-dev
编译测试程序:
#include "libavformat/avformat.h"
#include "libavcodec/avcodec.h"
#include "libavutil/avutil.h"
#include "stdio.h"
int main(int argc, char* argv[])
{
printf("going to av_register_all\n");
av_register_all();
return 0;
}
gcc -o ffmpeg_test ./ffmpeg_test.c -lavformat -lavcodec -lavutil -lz -lm -lpthread -lbz2
出现大量未定义错误,如下:
/usr/local/lib/libavcodec.a(alsdec.o): In function `decode_frame':
/home/cv/code_bank/ffmpeg/libavcodec/alsdec.c:1453: undefined reference to `av_get_bits_per_sample_fmt'
/usr/local/lib/libavcodec.a(alsdec.o): In function `decode_init':
/home/cv/code_bank/ffmpeg/libavcodec/alsdec.c:1716: undefined reference to `av_get_bits_per_sample_fmt'
/usr/local/lib/libavcodec.a(bink.o): In function `decode_init':
...
collect2: ld 返回 1
请问有哪位兄弟知道是怎么回事?
怎么解决?
谢谢!