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

Ronald S. Bultje rsbultje at gmail.com
Tue Aug 28 04:11:38 CEST 2012


Hi,

On Mon, Aug 27, 2012 at 6:55 PM, jamal <jamrial at gmail.com> wrote:
> 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.

Uhm... Admittedly, I didn't test this on Linux, but uh ... Isn't that
the same thing? I don't think I understand shell scripting at all.

Anyway, you can change as suggested or I can send a new patch, should
be OK either way.

Ronald


More information about the ffmpeg-devel mailing list