[FFmpeg-devel] [PATCH] Use _snprintf for mingw build
Zuxy Meng
zuxy.meng
Mon Oct 15 09:51:04 CEST 2007
Hi,
2007/10/15, Fred Rothganger <fred at rothganger.org>:
> Zuxy Meng wrote:
> > I don't think MSVC is a supported platform.
> True. In fact, one exposes himself to censure by even daring to use it. :)
>
> However, I'm not trying to compile FFmpeg under MSVC, but merely to link
> to mingw binaries.
>
> > Furthermore MS's _snprintf
> > isn't the same as snprintf: the result of the former isn't guaranteed
> > to be zero terminated.
> >
> > Actually MinGW runtime has provided a sane snprintf.
> >
> Are you suggesting there is a way to link in a better snprintf() when
> building a executable image using MSVC? If so, please advise on the
> procedure. Would this consist of linking one of the libmsvcr*.a files
> from the mingw directory and completely suppressing any automatic
> linkage of the MSVC runtime?
You can either:
1. Convert libmingwex.a to a .lib and link it to your program.
2. Find the source of MinGW's snprintf (in mingw32-src tarball IIRC)
and add it to your project.
--
Zuxy
Beauty is truth,
While truth is beauty.
PGP KeyID: E8555ED6
More information about the ffmpeg-devel
mailing list