This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/77459] [6/7 Regression] undefined reference to `snprintf' when building mingw-w64 cross-compiler
- From: "gk at torproject dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 27 Sep 2016 13:06:56 +0000
- Subject: [Bug libstdc++/77459] [6/7 Regression] undefined reference to `snprintf' when building mingw-w64 cross-compiler
- Auto-submitted: auto-generated
- References: <bug-77459-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77459
--- Comment #3 from Georg Koppen <gk at torproject dot org> ---
(In reply to Jonathan Wakely from comment #2)
> It's 2016, how can snprintf not be supported still?
I asked about that problem in #mingw-w64 a while ago and got the following
answer:
M$ does not provide `snprintf()` despite their non-standard extension
`_snprintf()`. With mingw-w64, if the macro `__USE_MINGW_ANSI_STDIO` is defined
to `1`, `snprintf` is a macro that redirects calls to `snprintf` to
`__mingw_snprintf` instead.
Not sure if that helps debugging/fixing.