0

lpsolve is a C library that can be used to solve linear programming problems. They have some header files and using that you can create a dylib or a static library(.a). The osx library has some header files, a dylib file and .a file. but these were compiled for 32 bit. But OSX is using 64 bit OS now and I have to recompile these so that I can use their api.

Could anyone give me any links about how to compile these .h files for 64 bit os?

Morpheus
  • 3,285
  • 4
  • 27
  • 57
  • 1
    You can't compile header files, you'll need to download the source. – Kevin Mar 26 '14 at 01:30
  • I have the source header files. How do use these .h files to compile the library. – Morpheus Mar 26 '14 at 01:36
  • You have the source or you have the headers. "Source headers" doesn't make any sense. Do you have .c files? – Kevin Mar 26 '14 at 01:37
  • I only have .h files. There are no .c files – Morpheus Mar 26 '14 at 01:38
  • Fortunately for you, it looks like you can [download the source](http://downloads.sourceforge.net/project/lpsolve/lpsolve/5.5.2.0/lp_solve_5.5.2.0_source.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Flpsolve%2Ffiles%2Flpsolve%2F5.5.2.0%2F&ts=1395798242&use_mirror=tcpdiag). – Kevin Mar 26 '14 at 01:46
  • @kevin, Thanks for giving the link to the source. The folder contains files like this http://imgur.com/K7dkZIr . Now I have to use these to create a dylib or .so file? – Morpheus Mar 26 '14 at 01:52

1 Answers1

0

Assuming you rock Homebrew (and if you're not, go and install it, like, right now),

$ brew install lp_solve

and you're done. In case you prefer MacPorts, I believe you can do

$ port install lp_solve
Amadan
  • 191,408
  • 23
  • 240
  • 301
  • 404 not found. I am using homebrew. – Morpheus Mar 26 '14 at 01:38
  • Works for me. Are you sure your network works okay? Alternately, `brew update` might help. – Amadan Mar 26 '14 at 01:39
  • yes. xyz@yaw:~$ brew install lp_solve Error: No available formula for lp_solve Searching taps... Error: 404 Not Found Please report this bug: https://github.com/Homebrew/homebrew/wiki/troubleshooting – Morpheus Mar 26 '14 at 01:42
  • Ah, I see what might be going on - it's in a different repo. Can you try `brew tap homebrew/science`, then try installing again? – Amadan Mar 26 '14 at 01:57