Newer versions of glpk
do not have the LPX
api, which is required by older packages.
How can I use an older package (like COBRA) with the newer versions of glpk
?
Note that COBRA
is available for MATLAB and Python. Both require glpk
and the LPX
api, and I would like to use both.
Ideally you should switch to a version that uses the new API. It has been around for years. If that is no option, then the following entry in the ChangeLog to V4.53 points in the right direction
* examples/oldapi/lpx.h, examples/oldapi/lpx.c
A set of routines that simulate the old GLPK API (as defined
in 4.48) were added. Thanks to Jan Engelhardt <jengelh@inai.de>
for suggestion.
In the directory examples/oldapi
of the source release you find everything you need. Excerpt from README:
The program module in this subdirectory contains an implementation of
the old GLPK API as it was defined in GLPK 4.48.
To compile an existing project using the old GLPK API you need to add
to the project two files lpx.h and lpx.c.