[FFmpeg-devel] [PATCH] examples/decoding_encoding: remove unused variable "size"

Clément Bœsch ubitux at gmail.com
Thu Apr 12 11:41:08 CEST 2012


On Thu, Apr 12, 2012 at 11:18:52AM +0200, François Revol wrote:
> On 12/04/2012 11:11, Clément Bœsch wrote:
> > On Thu, Apr 12, 2012 at 10:14:30AM +0200, Nicolas George wrote:
> >> Le quartidi 24 germinal, an CCXX, Clément Bœsch a écrit :
> >>> Note: am I the only one to require an extra LDFLAGS=-lm to link this
> >>> example?
> >>
> >> Works for me. How do you try to link it exactly?
> >>
> > 
> > [~/ffmpeg/doc/examples]% make decoding_encoding
> > cc decoding_encoding.o -lavdevice -lavformat -lavfilter -lavcodec -lswscale -lavutil   -o decoding_encoding
> > /usr/bin/ld: decoding_encoding.o: undefined reference to symbol 'sin@@GLIBC_2.2.5'
> > /usr/bin/ld: note: 'sin@@GLIBC_2.2.5' is defined in DSO /lib/libm.so.6 so try adding it to the linker command line
> > /lib/libm.so.6: could not read symbols: Invalid operation
> > collect2: error: ld returned 1 exit status
> > make: *** [decoding_encoding] Error 1
> > 
> > [~/ffmpeg/doc/examples]% LDFLAGS=-lm make decoding_encoding
> > cc decoding_encoding.o -lm -lavdevice -lavformat -lavfilter -lavcodec -lswscale -lavutil   -o decoding_encoding
> > 
> > The libav* link against libm, but it works only for internal usage:
> > 
> > 95:            samples[2*j] = (int)(sin(t) * 10000);
> > 
> > This requires to link against -lm explicitely I guess (this is also true for
> > the muxing example).
> > 
> > And BTW, about that Makefile, I think LDLIBS would more appropriate that
> > LDFLAGS.
> > 
> 
> Note libm does not exist everywhere, so do not hardcode it.

I did not intend to do so, just wondering :)

> configure should already detect it, you just need to add the correct
> variable to the LDFLAGS.

Yes but this Makefile is independent because users will need to build
these examples out of the FFmpeg tree.

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120412/b84ccfd9/attachment.asc>


More information about the ffmpeg-devel mailing list