Wiki
Clone wikiOscaR / glpk-mac-os
Compilation glpk binaries
./configure CC=\"gcc -arch x86_64\" CXX=\"g++ -arch x86_64\" make sudo make install
Compilation glpk java
http://sourceforge.net/projects/glpk-java/files/glpk-java/glpk-java-1.0.16/
change the make file in swig repo to say where the jni.h is and the glpk header directory
SWIG_FLAGS := -I/usr/local/include -I/usr/include -I/Users/oscarlib/Documents/Pierre/various_solvers/glpk-4.45/include -I/System/Library/Frameworks/JavaVM.framework/Headers
also change libtool to glibtools and set the proper architecture:
glibtool --mode=compile --tag=junk gcc \$(SWIG_FLAGS) -c -arch x86_64 -fPIC src/c/glpk_wrap.c
glibtool --mode=link --tag=junk gcc -arch x86_64 -version-info \$(VERSION_INFO) -revision \$(REVISION) -g -O -o libglpk_java.la -rpath \${prefix}/lib/jni glpk_wrap.lo -lglpk
then make
the files are in swig/.bin
You can check if it is the correct architecture with lipo -info libglpk_java.dylib
Updated