Hello, When I generate a java interface for GLPK, I typically do something like this:
mkdir -p java/org/gnu/glpk swig -java -package org.gnu.glpk -o src/glpk_wrap.c -outdir java/org/gnu/glpk glpk.i so as not to clutter up the root of the source tree. Then, i'll jar up the contents of the "java" directory into glpk.jar, and use my IDE (XCode) to compile the GLPK sources along with the generated "src/glpk_wrap.c" into a shared library (obviously, in order to make the compile work, the code should be linked against the jvm and contain jni.h and jni_md.h in the includes path). I should note that SWIG doesn't generate a particularly "pretty" java interface for GLPK -- but it does generate an interface that works. I have written my own java adapter classes that wrap the java code that SWIG generates to make it much more programmer-friendly. I can share them if anyone is interested. --Kelly --- On Thu, 1/29/09, xypron <[email protected]> wrote: > From: xypron <[email protected]> > Subject: Re: [Help-glpk] Patch for GLPK 4.35 to support SWIG > To: [email protected] > Date: Thursday, January 29, 2009, 4:18 PM > > Hello Kelly, > > >> Today, I went ahead and packaged them into a patch > file so that > >> (hopefully) they can make it into the > >> trunk and save me the effort of maintaining my own > local GLPK copy. > > I appreciate you patch. > > GLPK compiles fine with the double definitions removed from > include/glpk.h. > > I would propose to put glpk.i into a new directory swig/ > because when > calling > swig -java glpk.i > a lot of new files will be created in the same directory as > glpk.i. > > It might make sense to add makefiles for some common > languages like java. > > Best regards > > Xypron > > -- > View this message in context: > http://www.nabble.com/Patch-for-GLPK-4.35-to-support-SWIG-tp21732549p21736079.html > Sent from the Gnu - GLPK - Help mailing list archive at > Nabble.com. > > > > _______________________________________________ > Help-glpk mailing list > [email protected] > http://lists.gnu.org/mailman/listinfo/help-glpk > _______________________________________________ Help-glpk mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-glpk
