【问题标题】:Error with ffmpeg - undefined wholeffmpeg 出错 - 未定义的整体
【发布时间】:2014-03-22 19:16:07
【问题描述】:

我在 clear lubuntu 上编译了 ffmpeg,并在 Eclipse 中将库附加到我的项目中时遇到了一堆错误:

/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 可以帮我处理那个工作人员吗?我卡在这里了,谢谢。

我还给你一些关于 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 的文件。但我不知道为什么以及该怎么做。

【问题讨论】:

  • libavutilffmpeg的唯一库文件吗?我想它对其他库有额外的依赖。看看this,他用-lavfilter-lavcodec(还有-lpthread)编译项目。
  • 它不会改变任何东西......
  • 请提供您传递给编译器的参数。
  • 你的意思是编译项目而不是ffmpeg? g++ -L/usr/local/lib/ -o "test" ./src/test.o -lpthread -lavfilter -lavcodec -lavutil -lavformat ./src/test.o:在函数'main'中:
  • this question。尝试将 -lavutil 移动到库列表的末尾。

标签: c++ linux linker ffmpeg


【解决方案1】:

通过提供帮助,我设法解决了问题,所以让我与您分享。 编译指南

How to set up ffmpeg for dev

使用此链接顺序:

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

【讨论】:

    猜你喜欢
    • 2018-01-21
    • 2012-05-05
    • 2021-11-28
    • 1970-01-01
    • 2016-06-29
    • 2014-07-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多