ktahar / ocaml-lp

LP and MIP modeling in OCaml
MIT License
27 stars 1 forks source link

Use Ctypes stubgen for lp-glpk #4

Closed ktahar closed 2 years ago

ktahar commented 2 years ago

Fixes (a part of) #3 by removing necessity of linking flags -cclib -lglpk on compilation of the apps using lp-glpk. This is done by stop using dynamic ctypes.foreign and start using stub-generation feature of ctypes. This patch also removes the hard-coding of C constants #defined in glpk.h.

Some references for stubgen features.

lp-gurobi is remained to use dynamic ctypes.foreign because build-time dependency on libgurobi (not open-source, limited access) will make some trouble.