Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to include lpsolve, a c-based linear programming library in my ios app

Tags:

ios

The library can be found here:

http://lpsolve.sourceforge.net/

The demo code on the site shows them doing a #include "lp_lib.h" and then making API calls to the library.

My question is: how do I get the various .so files that the site provides in the download of the library into a format and into xcode in a way that lets me include the .lib and make API calls to it?

like image 631
Michael Rubin Avatar asked Nov 25 '25 12:11

Michael Rubin


1 Answers

Compiling lp_solve for the armv7 architecture is incredibly difficult and has gotten the better of many talented people. I say this because the above answer makes it seem like if you follow the instructions closely enough you will be able to compile, then drag and drop.

I would use GLPK which I got to work on iOS. https://github.com/wisaruthk/MyGLPK.
The gentleman that compiled this package for iOS initially attempted to do it for lp_solve, but could not get it to work. This package will allow you to do a proof of concept, but infects your app with the GPL license. If you want to put your app on iTunes, you'll have to figure out how to get your hands on a commercially friendly package.

AlgLib is the cheapest commercially available library, but it does not have mixed integer programming. Other solutions Gurobi, Frontline Solver, NAG, Rogue Wave charge in excess of $5,000 for a developer license and will cut you a deal at scale to only charge your users $350 for a run time license.

like image 65
StemOner Avatar answered Nov 27 '25 02:11

StemOner



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!