Building 1.3.92 (and maybe 1.4.0) for Win32

Zuxy zuxy.meng at gmail.com
Thu Nov 18 15:57:26 CET 2004


vasprintf is defined for Win32 in util\strgutil.c. Did you
accidentally modify the #ifdef _WIN32 and #endif pair around its
definition?

On Thu, 18 Nov 2004 11:35:14 +0000 (UTC), Carlo Luciano Bianco
<clbianco at tiscalinet.it> wrote:
> Dear GnuPG developers,
> 
> I am trying to apply the "alternative" MinGW/MSYS compilation technique
> described at point 5 on my page:
> 
> <http://web.tiscali.it/clbianco/gnupg/eng/gnupg.html>
> 
> 
> 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
> `vasprintf'
> ../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
> ---------------------------------------------------------------------------

Now there are too many possible combinations of compiler/shell/library
when you port gnupg to Win32. I myself currently use
MSYS+MinGW+zlib+libbzip2+libiconv+libgw32c to build gpg under Windows
(all libs statically linked except libiconv), but people can also
build it natively with just MSYS+MinGW, or cross-build it with
MinGW-CPD. For the developers of GnuPG, it might be best to avoid any
unnecessary asumption of the building enviroments other than Linux. I
guess that's why they include zlib and simplified regex and gettext
within the package.

I hope one day Win32 will supply full POSIX compatibility.

-- 
Zuxy
Beauty is truth,
While truth is beauty.
PGP KeyID: E8555ED6



More information about the Gnupg-devel mailing list