我在清晰的lubuntu上编译了ffmpeg,而在eclipse中将libs附加到了我的项目中,我遇到了一堆错误:
/usr/local/lib//libavformat.a(mov.o): In function `mov_read_sbgp': /root/ffmpeg/libavformat/mov.c:2039: undefined reference to `av_malloc' /usr/local/lib//libavformat.a(mov.o): In function `mov_read_dac3': /root/ffmpeg/libavformat/mov.c:647: undefined reference to `avpriv_ac3_channel_layout_tab' /usr/local/lib//libavformat.a(mov.o): In function `mov_read_tfhd': /root/ffmpeg/libavformat/mov.c:2559: undefined reference to `av_log' /usr/local/lib//libavformat.a(mov.o): In function `mov_read_stts': /root/ffmpeg/libavformat/mov.c:1908: undefined reference to `av_malloc' /root/ffmpeg/libavformat/mov.c:1921: undefined reference to `av_log' /root/ffmpeg/libavformat/mov.c:1925: undefined reference to `av_log' /usr/local/lib//libavformat.a(mov.o): In function `mov_read_stss': /root/ffmpeg/libavformat/mov.c:1790: undefined reference to `av_malloc' /usr/local/lib//libavformat.a(mov.o): In function `mov_read_stsc': /root/ffmpeg/libavformat/mov.c:1712: undefined reference to `av_malloc'
它只是输出的一部分。可能somoone帮助我的工作人员? 我困在这里,thx。
另外我给你一些关于ld的信息–verbose -l avformat:
attempt to open /usr/i686-linux-gnu/lib32/libavformat.so failed attempt to open /usr/i686-linux-gnu/lib32/libavformat.a failed attempt to open /usr/local/lib32/libavformat.so failed attempt to open /usr/local/lib32/libavformat.a failed attempt to open /lib32/libavformat.so failed attempt to open /lib32/libavformat.a failed attempt to open /usr/lib32/libavformat.so failed attempt to open /usr/lib32/libavformat.a failed attempt to open /usr/local/lib/i386-linux-gnu/libavformat.so failed attempt to open /usr/local/lib/i386-linux-gnu/libavformat.a failed attempt to open /usr/local/lib/libavformat.so failed attempt to open /usr/local/lib/libavformat.a succeeded ld: warning: cannot find entry symbol _start; not setting start address
一切都将是avutil问题….所有未定义的参考来自libavutil的文件。 但是我不知道为什么和怎么做。
通过给予帮助,我设法解决问题,让我与你分享。 编译指导
如何为dev设置ffmpeg
使用这个链接顺序:
avdevice avfilter postproc avformat avcodec rt dl Xfixes Xext X11 asound SDL vorbisenc vorbis theoraenc theoradec ogg opencore-amrwb opencore-amrnb z rt swresample swscale avutil m z swresample faac mp3lame vpx x264 xvidcore pthread