[FFmpeg-devel] [PATCH] lavu: add snprintf(), vsnprint() and strtod() replacements for MS runtime.

jamal jamrial at gmail.com
Tue Aug 28 03:55:45 CEST 2012


On 27/08/12 10:44 PM, Michael Niedermayer wrote:
> 
> This breaks cross compilation to mingw, i get:
> 
> LD  ffmpeg_g.exe
> libavfilter/libavfilter.a(af_silencedetect.o): In function `init':
> ffmpeg/libavfilter/af_silencedetect.c:68: undefined reference to `avpriv_strtod'
> libavfilter/libavfilter.a(af_volume.o): In function `init':
> ffmpeg/libavfilter/af_volume.c:48: undefined reference to `avpriv_strtod'
> libavformat/libavformat.a(sbgdec.o): In function `lex_double':
> ffmpeg/libavformat/sbgdec.c:244: undefined reference to `avpriv_strtod'
> libavformat/libavformat.a(sbgdec.o): In function `str_to_time':
> ffmpeg/libavformat/sbgdec.c:195: undefined reference to `avpriv_strtod'
> libavformat/libavformat.a(sbgdec.o): In function `parse_options':
> ffmpeg/libavformat/sbgdec.c:373: undefined reference to `avpriv_strtod'
> libavformat/libavformat.a(sbgdec.o):ffmpeg/libavformat/sbgdec.c:411: more undefined references to `avpriv_strtod' follow
> collect2: ld returned 1 exit status
> make: *** [ffmpeg_g.exe] Error 1
> 
> config.h:#define HAVE_SNPRINTF 1
> 
> [...]
> 
I think configure is including strtod.h to CFLAGS even though it shouldn't.
Check config.mak, -includecompat/strtod.h is at the end of CFLAGS even though HAVE_BROKEN_STRTOD is false.
It seems to do it even when compiling for linux.

Changing "disabled broken_strtod || force_include compat/strtod.h" to "enabled broken_strtod && force_include compat/strtod.h" in configure fixed this for me.

Regards


More information about the ffmpeg-devel mailing list