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

Michael Niedermayer michaelni at gmx.at
Tue Aug 28 03:44:10 CEST 2012


On Mon, Aug 27, 2012 at 02:00:37PM -0700, Ronald S. Bultje wrote:
> From: "Ronald S. Bultje" <rsbultje at gmail.com>
> 
> ---
>  compat/snprintf.c  | 64 +++++++++++++++++++++++++++++++++++++
>  compat/snprintf.h  | 46 +++++++++++++++++++++++++++
>  compat/strtod.c    | 92 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  compat/strtod.h    | 37 ++++++++++++++++++++++
>  configure          | 26 +++++++++++++++
>  libavutil/Makefile |  3 ++
>  6 files changed, 268 insertions(+)
>  create mode 100644 compat/snprintf.c
>  create mode 100644 compat/snprintf.h
>  create mode 100644 compat/strtod.c
>  create mode 100644 compat/strtod.h

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

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Breaking DRM is a little like attempting to break through a door even
though the window is wide open and the only thing in the house is a bunch
of things you dont want and which you would get tomorrow for free anyway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120828/2ff55b5f/attachment.asc>


More information about the ffmpeg-devel mailing list