[FFmpeg-devel] [PATCH] Remove printf format string errors in windows builds
Larry Robinson
silver-dad
Mon Jan 24 00:36:52 CET 2011
On 1/23/2011 3:05 PM, Jean-Baptiste Kempf wrote:
> Hello,
>
> On Sun, Jan 23, 2011 at 02:58:23PM -0800, Larry Robinson wrote :
>> Both Mingw32 and Mingw64 rely on msvcrt.dll to interpret format strings
>> for printf, sscanf, etc. and so gcc doesn't recognize `t' or `z' width
>> specifications for 64-bit types on windows. It therefore produces warnings
>> and incorrect code for format strings containing `%td', `%zd', ...
> Are you sure you shouldn't just use -D__USE_MINGW_ANSI_STDIO=1
>
> Best Regards,
>
Thank you, I was not aware of that. I am actually building 64-bit
libraries using mingw-w64, and unfortunately __USE_MINGW_ANSI_STDIO is
not fully implemented there. On their support wiki
"http://sourceforge.net/apps/trac/mingw-w64/wiki/printf%20and%20scanf%20family"
it states:
"Currently only printf family is implemented and scanf implementation is
waiting for volunteer."
Sure enough, I tried it and still get the warning. Given that, what's
the best way to fix this on x86_64-w64-mingw32?
Regards,
Larry Robinson
More information about the ffmpeg-devel
mailing list