I rewrote my answer because I wanted to create a complete guide.
Install GnuPG and MinGW-Get into the directory without spaces. After installing MinGW with !!! GUI !!!, open mingw-get, install these components:
mingw32-gcc (check all) mingw32-libz (dll is the most important)
Download and install MSYS , that is, a command line tool to run commands such as make.
Then put c:\msys\1.0\bin\ (or wherever you install it) at the beginning of the PATH variable. Restart eclipse or open a new cmd and it should work.
In the build.xml file: line 21:
classpath="lib/junit-4.4.jar" added.(and the junit is in the lib dir)
In the GNUmakefile: line 9:
ALL_CFLAGS := -Wall -Wno-deprecated-declarations -fPIC
line 10:
ALL_CPPFLAGS = -D_REENTRANT -D_THREAD_SAFE -D_FILE_OFFSET_BITS=64 -DLARGEFILE_SOURCE=1 \ -I"c:/WORK/x/gnu/jdk/jdk1.8.0_25/include" -I"c:/WORK/x/gnu/jdk/jdk1.8.0_25/include/win32"
line 21-27:
JAVA_HOME := c:/WORK/x/gnu/jdk/jdk1.8.0_25 ALL_CFLAGS += -mms-bitfields -Wl,--add-stdcall-alias ALL_CPPFLAGS += -I"c:/WORK/x/gnu/jdk/jdk1.8.0_25/include/win32" -I"c:/WORK/x/gnu/jdk/jdk1.8.0_25/include" -I"c:/GNU/GnuPG/include" ALL_LDFLAGS := -s -shared -Wl,--enable-auto-import ALL_LIBS := -L"c:/GNU/GnuPG" -lgpgme-11 GNUPG_LIB := $(BUILD_DIR)/gnupg-for-java.dll
line 63:
$(CC) $(DEBUG) $(ALL_CFLAGS) $(ALL_LDFLAGS) $^ -o "$(BUILD_DIR)/gnupg-for-java.dll" $(ALL_LIBS)
Summary: This works for me and outputs the jar and dll file to the build directory. My working directory was c: / WORK / x, so replace the paths in which it differs. Do not use the "Program Files" anywhere, as you can see that I had to copy everything from there.
gaRos
source share