<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi,<br>
I've managed to compile PPL to a windows dll along with java interface
using MinGW. I will describe how I achieved this step by step. First
thing was to build the ppl library (not java interface) to a dll.
I found out that to do this AC_LIBTOOL_WIN32_DLL must be added to
autoconf along with '-no-undefined' to LDFLAGS (see<a
 href="http://sourceware.org/autobook/autobook/autobook_254.html">
http://sourceware.org/autobook/autobook/autobook_254.html</a> ). I also
based this on gmp's autoconf file. Patch is available in attached
patch.configure.ac file (running autoconf is needed to create configure
file). To compile ppl to a dll you need to run configure with
parameters: "--disable-static --enable-shared".<br>
<br>
I didn't manage to compile ppl dll to use static gmp library version. I
compiled gmp as a shared library (configure --enable-cxx
--disable-static --enable-shared). Unfortunately make check fails when
gmp is compiled like this - but it seems the library works ok. After
compiling gmp I made copy of libgmp.dll.a as libgmp.a and
libgmpxx.dll.a to libgmpxx.a so that PPL can be linked to it (possibly
there is another solution).<br>
<br>
Later I had to compile the Java library (add --enable-interfaces=java,
to configure arguments). I had some problems with configuring java path
(--with-java=DIR) this is because I use the 64 bit windows system -
java is installed in "C:\Program Files (x86)\Java\jdk1.6.0_17".  (i
passed --with-java="/c/Program Files (x86)/Java/jdk1.6.0_17") I had to
manually update makefiles for java interface because javah was not
properly found, includes were not properly generated (there was
"-I/c/Program Files (x86)/Java/jdk1.6.0_17/include/mingw" instead of
"-I/c/Program Files (x86)/Java/jdk1.6.0_17/include/win32") and had
manually fix java directory issues (add "'s).<br>
Another important thing was to modify Makefile for the jni dll file
(interfaces/Java/jni) (see <a class="moz-txt-link-freetext" href="http://www.mingw.org/node/41">http://www.mingw.org/node/41</a> ) - add "
-D_JNI_IMPLEMENTATION_ -Wl,--kill-at" flags to libppl_java_la_LDFLAGS.
After these modifications the dll was successfully build. <br>
<br>
PS.<br>
Also I'm not sure when the jni compilation flags should be added (gcc
and windows machines?) and I'm not autoconf expert - this hopefully
could be automatized. <br>
<br>
regards,<br>
Krzysztof Jakubczyk<br>
<br>
</body>
</html>