Compiling my own GNUPG-binary on a Windows-system

Werner Koch
Fri Dec 13 13:33:02 2002

On Fri, 13 Dec 2002 10:19:44 +0100, Johannes Leitsch said:

> Is it possible to make / compile a Windows-binary on a "Unix"-system
> (*BSD, Linux)?

see gnupg/doc/README.W32.  Actually this is the suggested way to do
build it.  The release number for the kit given in the file is a bit
to optimistic, I haven't yeat achieved to release this version.  The
old one should still work.



How to build it from the source:
This version has been build with the Mingw32/CPD kit using the latest
stable version of GnuPG.

First get the source: It has to be available at the same location you
found this binary package - if not you should have received a written
offer to get the source delivered to you See the file COPYING (section
3) for details.

If you got this package from its canonical place (, the
source is available at:

or for development snapshots

this is the same source as for the Unix version.  If your binary
version of GnuPG is called something like, you
should find a patch file named gnupg-w32-1.0.4-1.0.4-1.diff.gz at the
same location, which has to be applied to the stock gpg source file.
Instructions are at the top of this file.

To build it, you need the MingW32/CPD kit, which is available at

gcc and binutils are stock GNU source which are available
at every GNU mirror. 

After you have installed this environment you should be able to do this:

 $ scripts/ --build-w32
 $ make
 $ mingw32 strip g10/gpg.exe
 $ cp g10/gpg.exe  /some_windows_drive/

And everything hopefully works.  If there is a make problem in the
"po" directory you can eiterignore it or do a "touch po/all".  To
build the distribtion ZIP file, you have to create a directory
"dist-w32" and run "scripts/mk-w32-dist" right after a successul make