From: Keith M. <kei...@us...> - 2008-12-13 10:51:20
|
On Saturday 13 December 2008 02:22:02 JonY wrote: > > Google will only tell me that "%Lf" is broken on MinGW (as of a > > few years ago), and the wiki has been removed. It isn't so much that "%Lf" is broken, as that MSVCRT doesn't differentiate between `long double' and `double'. Both are treated as being 64-bit; however, MinGW has 80-bit `long double'. > Try adding "-D__USE_MINGW_ANSI_STDIO" to gcc when compiling it. mingwrt-3.15 onwards[*] provides a fully ANSI conformant printf(); however, it isn't used by default, unless you compile with `-ansi', `-posix' or, as JonY suggests, `-D__USE_MINGW_ANSI_STDIO'. Regards, Keith. [*] Earlier mingw-runtime versions didn't support this; you could, however, use snprintf() to get 80-bit `long double' interpretation. |