[Ffmpeg-devel] #include dsputil.h needed in opt.c

Xavier Rodriguez INEXBEE xavier.rodriguez
Mon Sep 19 08:12:39 CEST 2005


Hi,
Here I added more information on this issue:

When using the CVS snapshot I had this error message when compiling ffmpeg:

gcc  -g  -o ffmpeg_g ffmpeg.o cmdutils.o -L./libavformat -lavformat
-L./libavcodec -lavcodec -L./libavutil -lavutil -lm -lsocket -lnsl -lz
Undefined                       first referenced
 symbol                             in file
lrintf                              ./libavcodec/libavcodec.a(opt.o)
ld: fatal: Symbol referencing errors. No output written to ffmpeg_g
collect2: ld returned 1 exit status
make: *** [ffmpeg_g] Error 1


I have seen that lrintf function was pre-processed in the dsputil.h file and
used by several c files in order to manage the fact that some systems like
the solaris ones do not have this function in its libraries. The problem is
that libavcodec/opt.c file uses the lrintf function but does not include
dsputil.h file.

My system is Solaris 8 HW 12/02 s28s_hw1wos_06a SPARC and I am using gcc
(GCC) 3.3.2.

Here is the diff I have used to resolve this problem:

bash-2.03$ diff -ruN libavcodec/opt.original libavcodec/opt.c
--- libavcodec/opt.original     2005-09-19 08:12:14.700002000 +0200
+++ libavcodec/opt.c    2005-09-19 08:12:40.280002000 +0200
@@ -26,6 +26,7 @@

 #include "avcodec.h"
 #include "opt.h"
+#include "dsputil.h"

 static double av_parse_num(const char *name, char **tail){
     double d;


Best regards,
Xavier

 






More information about the ffmpeg-devel mailing list