Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ ffmpeg错误-未定义的整体_C++_Linux_Linker_Ffmpeg - Fatal编程技术网

C++ ffmpeg错误-未定义的整体

C++ ffmpeg错误-未定义的整体,c++,linux,linker,ffmpeg,C++,Linux,Linker,Ffmpeg,我在clear lubuntu上编译了ffmpeg,在eclipse中将LIB附加到我的项目时,我遇到了一系列错误: /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 `m

我在clear lubuntu上编译了ffmpeg,在eclipse中将LIB附加到我的项目时,我遇到了一系列错误:

/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'
这只是产出的一部分……索莫恩能帮我安排一下工作人员吗?我在这里绊倒了,谢谢

此外,我还提供了一些关于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的文件。但我不知道为什么以及该怎么做。

通过提供帮助,我设法解决了这个问题,所以让我和你们分享。 用于编译guid

使用此链接顺序:

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

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