On May 7, 2014, at 8:54 AM, Geert Janssens <[email protected]> wrote:
> On Friday 02 May 2014 14:55:42 John Ralls wrote: >>>> then I get the dreaded unrecognized “l” format error, >>> >>> What is the dreaded unrecognized "l" format error ? I have never >>> seen it on my WinXP test system. In which step do you get this ? >> It’s that the ancient msvcrt.dll used by MinGW doesn’t know about %lld >> for printing or scanning int64s. Back before Microsoft accepted the >> c99 standard (around 2006, IIRC) their printf() required using %I64d >> instead, and threw a "unknown conversion type character 'l' in format >> [-Wformat]” warning. The msvcrt.dll in MinGW is that old. There are a >> couple of workarounds, and -D__USE_MINGW_ANSI_STDIO is one of them. > > Ok. Just to clear it up completely for me: when you set that directive > mingw does understand %lld ? It does. > > Would that also work on Windows XP or not ? Hmm, Windows XP is 32-bit > only so perhaps when building on WinXP you never see that directive. Is > it a problem only for 64-bit ? I don't think so. We use lots of int64_t regardless of the pointer size. > > Perhaps related: business users can define a number format for > invoices/bills via File->Properties->Business. I remember there also > this problem of %lld vs %I64d is rearing its ugly head. So if we build > gnucash with the above directive perhaps this problem would go away as > well ? That I'm not sure about, because it's after the compiler has had a chance to apply any macros. If __USE_MINGW_ANSI_STDIO overrides msvcrt's printf implementation then it will work; if it just transforms constant format strings, it won't. Regards, John Ralls _______________________________________________ gnucash-devel mailing list [email protected] https://lists.gnucash.org/mailman/listinfo/gnucash-devel
