Some MinGW/MSYS building observations for GnuPG 1.4.0

Joe Vender jvender at
Sat Dec 18 12:49:51 CET 2004

Hash: SHA256

For those who are trying to build GnuPG 1.4.0 using MinGW/MSYS
as per instructions provided at

and running into make failure with a message about "undefined
reference to vasprintf", here's what I've found.

The MinGW/MSYS Windows port of contains a
version of libintl.h which includes a bunch of redefinitions for
the *printf functions


#undef vasprintf
#define vasprintf libintl_vasprintf
extern int vasprintf (char **, const char *, va_list);

and something similar for a bunch of other *printf functions.

These redefinitions aren't present in the version of libintl.h, but since the version of libintl.h is newer than the version, during the build system setup,
the gettext verion overwrites the libintl version when setting
up the build system as per Carlo's instructions.

On my Windows98 machine, the libintl.h header file is found in

Under MinGW/MSYS on Windows (for me at least on Windows98 and
the build system as described on Carlo's page), if these *printf
redefinitions in libintl.h are commented out before doing a
"./configure && make" on GnuPG 1.4.0, not only does this solve
the error messages, "undefined reference to vasprintf", which
result in failure of "make", but it also solves all of the
warning messages which I was getting, "warning: libintl_printf
is an unrecognized format function".

Of course, commenting this code out isn't the proper way to
handle this, since this will impact the gettext stuff somewhere.
I'm not suggesting this course of action for anyone to build a
set of binaries to be trusted. Suggestions would be helpful.
Perhaps an

#ifdef vasprintf
   #undef vasprintf

code block before the vasprintf function declaration in
strgutil.c? Something similar for the printf function? Thanks.
I'm not a programmer, just tinkering and learning.

Joe Vender

Version: GnuPG v1.4.0 (MingW32) - GPGshell v3.30


More information about the Gnupg-devel mailing list