[Ffmpeg-devel] have cos and sin left libm??

Rich Felker dalias
Sun Oct 22 19:48:39 CEST 2006


On Sun, Oct 22, 2006 at 06:47:19PM +0200, V?ctor Paesa wrote:
> Hi,
> 
> > Using today's svn - 6764 -I tried to build with enable-dts.
> > It fails here ( config.err);
> >
> > gcc -fPIC -march=k8 -pthread -c -o
> > /tmp/ffmpeg-conf-31736-19483-25707.o
> > /tmp/ffmpeg-conf-5025-19483-10772.c
> > gcc -Wl,--warn-common -Wl,--as-needed -pthread -o
> > /tmp/ffmpeg-conf-22367-19483-692 /tmp/ffmpeg-conf-3
> > 1736-19483-25707.o -lm -lz -ldts
> > /usr/lib/gcc/x86_64-redhat-linux/4.1.1/../../../../lib64/libdts.a(parse.o):
> > In function `dts_init':
> > (.text+0x625): undefined reference to `cos'
> > /usr/lib/gcc/x86_64-redhat-linux/4.1.1/../../../../lib64/libdts.a(parse.o):
> > In function `dts_init':
> > (.text+0x681): undefined reference to `cos'
> > /usr/lib/gcc/x86_64-redhat-linux/4.1.1/../../../../lib64/libdts.a(parse.o):
> > In function `dts_init':
> > (.text+0x6ca): undefined reference to `cos'
> > /usr/lib/gcc/x86_64-redhat-linux/4.1.1/../../../../lib64/libdts.a(parse.o):
> > In function `dts_init':
> > (.text+0x70f): undefined reference to `sin'
> > collect2: ld returned 1 exit status
> >
> > Notice libm is included.
> >
> > ???
> >
> 
> Most probably, the order of libraries matters in your plaform.
> 
> Could you try:
> gcc -Wl,--warn-common -Wl,--as-needed -pthread -o
>  /tmp/ffmpeg-conf-22367-19483-692 /tmp/ffmpeg-conf-3
>  1736-19483-25707.o -ldts -lz -lm

Yes, if libdts uses libm then -lm MUST be after -ldts.

Rich





More information about the ffmpeg-devel mailing list