Can't build on Win32

David Shaw dshaw at jabberwocky.com
Wed May 28 21:58:01 CEST 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wed, May 28, 2003 at 11:27:36AM -0400, Eddie Roosenmaallen wrote:

> Works a bit better, but still bails in keyserver/. Here's the output for
> that dir:
> 
> > Making all in keyserver
> > make[2]: Entering directory `/c/projects/gnupg-1.3.2/keyserver'
> > if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I../intl    -g -O2 -Wall
> - -MT gpgkeys_hkp.o -MD -MP -MF ".deps/gpgkeys_hkp.Tpo" \
> >   -c -o gpgkeys_hkp.o `test -f 'gpgkeys_hkp.c' || echo './'`gpgkeys_hkp.c; \
> > then mv -f ".deps/gpgkeys_hkp.Tpo" ".deps/gpgkeys_hkp.Po"; \
> > else rm -f ".deps/gpgkeys_hkp.Tpo"; exit 1; \
> > fi
> > gpgkeys_hkp.c: In function `main':
> > gpgkeys_hkp.c:751: warning: implicit declaration of function `getopt'
> > gpgkeys_hkp.c:766: `optarg' undeclared (first use in this function)
> > gpgkeys_hkp.c:766: (Each undeclared identifier is reported only once
> > gpgkeys_hkp.c:766: for each function it appears in.)
> > gpgkeys_hkp.c:777: `optind' undeclared (first use in this function)
> > make[2]: *** [gpgkeys_hkp.o] Error 1
> > make[2]: Leaving directory `/c/projects/gnupg-1.3.2/keyserver'
> > make[1]: *** [all-recursive] Error 1
> > make[1]: Leaving directory `/c/projects/gnupg-1.3.2'
> > make: *** [all] Error 2
> 
> Closer and closer... (Windows is such a pain in the backside)
> 
> Looks like it's getopt, optarg and optind giving me grief - are they *nix
> standard, or have I broken something in MinGW?

I think mingw32 doesn't have getopt without libiberty.  Hmm.  What
happens if you add "#include <getopt.h>" to gpgkeys_hkp.c ?

You'll need to manually link with:

  gcc -o gpgkeys_hkp.exe  gpgkeys_hkp.o ../util/libutil.a -liberty -lwsock32
  
David
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3-cvs (GNU/Linux)
Comment: http://www.jabberwocky.com/david/keys.asc

iD8DBQE+1QbR4mZch0nhy8kRAntLAKC6C4BSjh4iULAZHdxispd+zgAzfACgpuln
+O3KCqzI+4rBfjYDn6ZgXmM=
=h41u
-----END PGP SIGNATURE-----




More information about the Gnupg-devel mailing list