I am looking for an iOS library that enables solving LP, IP, BIP, MIP for an application I am developing. I've found GLPK but have no idea how to compile it for iOS, and after searching the web for some time, I did not find anything interesting... I'd appreciate if someone can help me how to compile GLPK for iOS or either knows of some open source LP solver for iOS.
-
1You should really get yourself into being able to `./configure; make; make install` for iOS, else you will have to ask a question like this one everytime you encounter a task for which there's an awesome opensource library available but not in the form of an Xcode project, and that's unacceptable. – Oct 19 '12 at 18:05
-
3I understand your point, however, as a beginning developer, I lack the knowledge to do so, and that is why I posted this question. I hope that with some of the answers I've received, I'd be able to do so by myself in the next time, but until then, I'm clueless of how to do so... – Edgepo1nt Oct 19 '12 at 18:49
-
@Edgepoint "however, as a beginning developer, I lack the knowledge to do so" <- Don't think I born with this ability either! Of course as a beginner you don't know it. But you can try to learn it, it's not that complicated. And trust me, it's really, really worth it. [Here's how.](http://tldp.org/LDP/LG/current/smith.html) – Oct 19 '12 at 18:51
1 Answers
I used GMP (GNU Multiple Precision Arithmetic Library) for iOS development, what is basically a C based static library for various mathematical purpose. I had to do calculation on a big matrix, so I needed a library that support arbitrary precision. I installed it with MacPorts. MacPorts is a terminal based package management system on Mac, like yum or apt on Debian. After you installed the appropriate static library as I installed GMPL with "sudo port install gmp", after that you can check out in Xcode the static library under "Link Binary With Library" section. Press the "Add Other.." button, go the the /opt/local/lib folder, this is the default installation folder for MacPorts, and check out your static library. Add some header to your code, and voila, you can do your computations.
In the picture below you can see libgsl as well, that is the GNU Scientific Library, I would recommend it too.

- 8,084
- 8
- 48
- 62

- 32,867
- 38
- 193
- 353
-
@János I've done as you said. However, when including "#include
" it sais 'File not found'. Also, what do you mean by 'Add some header to your code' ? – dwbrito May 22 '13 at 20:10 -
How does that even link ? Macports compile GMPL for i386 but ios device use ARM. – alecail Oct 22 '13 at 05:55