[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-glpk] JNI interface for glpk for windows
From: |
Chris Rosebrugh |
Subject: |
[Help-glpk] JNI interface for glpk for windows |
Date: |
Wed, 9 Jul 2003 21:05:41 -0700 |
Attached are the changes I made in order to get the contrib/java-binding
stuff to compile and work on Windows 2000 and XP.
The things I changed are:
- Makefiles
- made them use accurate dependencies.
- added 'clean' and 'test' targets. 'test' correctly
executes the Magic Square program you wrote.
- added generation (via javah) of the org_gnu_glpk_GlpkSolver.h
header file.
- added options to gcc in order to properly build the DLL.
- added gcc CFLAG -mno-cygwin in order to build the DLL so
that cygwin is not required.
- glpk.c
- includes the new org_gnu_glpk_GlpkSolver.h header.
Made changes as necessary to make functions consistent
with header.
- GlpkSolver.java
- changed some native method signatures to match the
implementations in glpk.c so that the org_gnu_glpk_GlpkSolver.h
header works properly.
- GlpkMagicSquare.java
- added better error message for when the library load fails
The other main thing that changes for windows is that libglpk.a must
be rebuilt with the -mno-cygwin gcc flag. If -mno-cygwin is not
used for both libglpk.a and libglpk_jni.dll then the print statements
from glpk do not make it to stdout/stderr. Everything works, but no
printing happens. The -mno-cygwin flag requires that users have
the gcc-mingw package installed (available from www.cygwin.com).
If you want the actual libraries let me know and I'll send them
to you.
Yuri Victorovich, the original author, is planning on incorporating
these in a future release of glpk.
java-binding.zip
Description: Zip compressed data
- [Help-glpk] JNI interface for glpk for windows,
Chris Rosebrugh <=