Building 1.3.92 (and maybe 1.4.0) for Win32

Carlo Luciano Bianco clbianco at
Thu Nov 18 12:35:14 CET 2004

Dear GnuPG developers,

I am trying to apply the "alternative" MinGW/MSYS compilation technique
described at point 5 on my page: 


to GnuPG 1.3.92 (the "legacy" technique, point 4, works perfectly).

Unfortunately I get into the following error (I omitted in [...] all the
CFLAGS optimization stuff like -mcpu, -mtune, -O3, ecc.): 

gcc [...] -o bftest.exe  bftest.o ../cipher/libcipher.a ../mpi/libmpi.a
../util/libutil.a -lintl  -lwsock32 
../util/libutil.a(ttyio.o)(.text+0x1f6):ttyio.c: undefined reference to
../util/libutil.a(ttyio.o)(.text+0x2ed):ttyio.c: undefined reference to
`vasprintf' collect2: ld returned 1 exit status
make[2]: *** [bftest.exe]
Error 1 make[2]: Leaving directory `/home/gnupg-1.3.92/tools'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/gnupg-1.3.92'
make: *** [all] Error 2

I tried to make some modification to the source code by myself, to fix the
error, but I got lost very soon... Any comment / suggestion? 

I agree that "legacy" build with the included libraries works perfectly,
and then maybe such "alternative" compilation using the native Win32
libraries (gettext, libiconv, ecc.) is not worthed the time it needs to be

But I think that this "alternative" way can help to remove many "#ifdef
_WIN32" from the GnuPG source code, thus making the work of GnuPG
developers much easier letting them focus on crypto stuff and not on OS
sillinesses... ;-) 

Moreover, this does not "break" in any way the possibility to build GnuPG
for Win32 using a cross-compiler from Linux, because such "native"
libraries are just plain .zip files which can be easily installed in a
cross-compilation environment. 

That's why I prefer so strongly the "alternative" way vs. the "legacy" one
and why, IMVHO, it would be very useful to have it working also in 1.4.0

What do you think about?

Thank you in advance for your reply!

Best regards,
Carlo Luciano

| Carlo Luciano Bianco | ICQ UIN: 109517158                              |
|______________________| Home page: <>    |
|GPG DSA/ElG 1024/4096:|_________________________________________________|
|KeyID:0x5324A0DA - Fingerprint:8B00C61034120506111B143DEDBF71B45324A0DA |

More information about the Gnupg-devel mailing list