[Gpg4win-devel] Building Gpg4win with cygwin/MinGW
Werner Koch
wk at gnupg.org
Wed Jul 25 18:22:41 CEST 2007
On Wed, 25 Jul 2007 16:15, sascha.teichmann at intevation.de said:
> $ ./configure --enable-maintainer-mode --host=i586-mingw32msvc
Consider using
./autogen.sh --build-w32
which tries to find a suitable compiler and invokes configure then.
Maintainer mode is not required in all cases, you can do without it as
long as you don't change thye Makefiles. Some fixes to this script atre
required, though.
> Choosing the *-mingw platform is said to generate native
> Windows binaries. This is not a real cross compilation so
> I set the --build instead of the --host option. Setting host
I doubt that this is a good idea. You should really try to let it work
like a real cross compiler.
> $ export CPPFLAGS=" -D__MINGW32__ -D_WIN32 -DWIN32_LEAN_AND_MEAN"
> $ ./configure --enable-maintainer-mode --build=i686-pc-mingw32
>
> (Setting the pre-processor flags should not be necessary)
Yes, please don't fo this. The mingw gcc sets all require flags. I
doubt that LEAN_AND_MEAN will work.
> Unfortunately the compiling stops already when it comes to the
> W32PTH library because some enums are already defined.
That is a usual problem with mingw, symbols come and sometimes even go.
> I think I can work around this by inserting a few #ifdef's.
yep.
> Fixing each package one by one would be very painful and tedious job.
W32PTH is very special. There should be no need for fizes in the otehr
packages. If it is a problem with new symbols defined, we will fix this
in upstream - it has to be done anyway to keep compatible with future
releases.
> - Maybe I should I build a i586-mingw32msvc cross compiler by hand first
> and build gpg4win with this? (I have not found a already build one yet)
That's a good idea.
Shalom-Salam,
Werner
More information about the Gpg4win-devel
mailing list