[Libav-user] undefined reference errors from linker

Srinath M srinath3142 at gmail.com
Wed Jan 23 10:42:28 CET 2013


I am using ffmpeg version 1.1.1 now.

The examples in
/doc/examples all compile without any issue.

The program i am compiling is here
http://libccv.org/post/ccv-now-has-a-state-of-art-tracking-algorithm/
I plan to install it on a gumstix with Angstrom linux and opkg doesn't
support ffmpeg.
So i build from scratch.

Compilation to object file stage proceeds without any issue( which implies
it found the ffmpeg headers).
It is the linker that gives me errors always. These are the errors with
version 1.1.1 of ffmpeg

clang -o tld tld.o -L"../lib" -lccv -lavformat -lavcodec -lswscale -lz -lm

/usr/local/lib/libavformat.a(concat.o): In function `concat_close':
/home/srinath/Downloads/ffmpeg-1.1.1/libavformat/concat.c:52: undefined
reference to `av_freep'

And many many more similar errors.
I don't have the luxury of using pkg-config, on a gumstix and have built
from scratch.
Do these sorts of errors ring a bell as to where i should look?



On Mon, Jan 21, 2013 at 6:21 PM, Stefano Sabatini <stefasab at gmail.com>wrote:

> In data Monday 2013-01-21 15:29:07 +0530, Srinath M ha scritto:
> > Hi
> >
> > I am using ffmpeg version 0.11.1 with Ubuntu 10.04
> > I get the following linker errors when i try to compile a program
> > tld.c:(.text+0x1a7): undefined reference to `avformat_network_init'
> > tld.c:(.text+0x1c9): undefined reference to `avformat_open_input'
> > tld.c:(.text+0x1dc): undefined reference to `avformat_find_stream_info'
> > tld.c:(.text+0x255): undefined reference to `avcodec_open2'
> > tld.c:(.text+0x333): undefined reference to `avcodec_decode_video2'
> > tld.c:(.text+0x525): undefined reference to `avcodec_decode_video2'
> >
> > Which version of ffmpeg should i be using?
> > is this a ffmpeg issue in the first place?
>
> Check doc/examples/Makefile, you should rely on pkg-config unless you
> really know what you're doing. A basic knowledge of linking/Makefile
> may also help.
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20130123/c4806581/attachment.html>


More information about the Libav-user mailing list