Fixing GLPKMEX and MPT errors

The latest version of GLPKMEX (a Matlab MEX interface to the GLPK library), version 2.4, has an error when being compiled with the latest version of GLPK (version 4.38 at the time I was writing this post). The problem is caused by some changes in the GLPK interface. A fix for this error was posted at You can simply download a new version of the file glpkcc.cpp at and replace the original file with it, then re-build GLPKMEX.

Also, a change in the status code returned by GLPK causes the MPT toolbox to be not able to use the latest version of GLPK. MPT cannot detect GLPK even though GLPKMEX was installed successfully and is working in Matlab. To fix this problem, replace the original file ‘mpt_solveLPi.m’ in the MPT installation (it locates in extras/auxiliary in the MPT directory) with a modified version, which you can find at

This entry was posted in Matlab and tagged , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s