looking for a linear programming library

I'm working on a gui layout manager, I've read some articles about implementing gui layout using linear constraint, seems interesting, for example

for a component has a fixed width and height,
  w = 30;
  h = 30;

a window(width 300) contains two rect, the width of rect1 is twice than rect2
  w1 = 2 * w2;
  w1 + w2 = 300;

a movie player keeps its width/height ratio as 16:9, and has a minimal width of 200
  w/h = 16/9;
  w >= 200;

Then the layout problem is transformed to solving these mathematical equation.
anyone has experience dealing with this problem? I'm looking for a library or some article about implementing one.


Its not exactly the answer to your question, but depending on your GUI framework you're using there exists some powerful layout manager:

Apple: Xcode has a very powerful and intuitive layout manager.
Qt: Qt Creator is also very powerful.
Its not exactly the answer to your question...

Hi, actually I'm implementing my own GUI framework and layout manager, the Xcode and Qt doesn't help.
The layout problem is equivalent to this problem:
x + y + z = 26
x - y = 1
2x + z - y = 18

how to get the result =>  x = 10, y = 9, z = 7
And there you may look for int gsl_linalg_HH_solve (gsl_matrix * A, const gsl_vector * b, gsl_vector * x)
Thanks, it doesn't support win32, I spent the last 10 minutes modifying #include path in every .h file, trying to get the hello world compile, but failed.. I'm giving up on this one..
From the INSTALL file:

Hints for Microsoft Windows

GSL should compile with GCC under Cygwin on Microsoft Windows.
There is a gsl package in the standard Cygwin distribution which
contains any patches needed.

With Mingw/MSYS some floating point issues have been reported which
cause failures in the monte/ test directory.

Maybe you want to install Cygwin or Mingw? It contains the most commonly used compiler suite with gcc. gcc is available on/for nearly all operating systems currently available.
Thanks but that's too complex to me, I'm looking for a win32 library.
Topic archived. No new replies allowed.