help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Help-glpk] C++ links, again ;-)


From: Antonello Lobianco
Subject: RE: [Help-glpk] C++ links, again ;-)
Date: Wed, 30 Nov 2005 08:32:44 +0100

Yes Frank, you are right.. for some reasons it didn't works the first
time I tried but now it's all ok. ;-)
For thoose that use kdevelop, to use glpk it is enought to place in the
project options->configuration options->flag linker-> -lglpk
and use the: 
extern "C" {
   #include "glpk.h"
}
in the headers of file where glpk functions are used.

Many thanks,
  Antonello Lobianco

Il giorno mar, 29/11/2005 alle 22.34 -0400, Frank Leanez ha scritto:
> I think you are probably not including glpk.lib
> 
> Try using the following command:
> 
> -lglpk
> 
> Hope it helps,
> Frank Leanez


> >hello all,
> >  I'm quite new on C/C++ programming..
> >'just trying to make a test C++ program working with glpk.
> >
> >Yes, I read the doc and searched the mailing list..
> >
> >I just added this two lines:
> >   LPX *lp;
> >   lp = lpx_create_prob();
> >
> >If I don't place any header I get the error:
> >
> >error: 'LPX' was not declared in this scope
> >error: 'lp' was not declared in this scope
> >error: 'lpx_create_prob' was not declared in this scope
> >
> >
> >But even if I place at the top of the header:
> >
> >extern "C" {
> >    #include "glpk.h"
> >}
> >
> >I still got the error:
> >  undefined reference to `glp_lpx_create_prob'
> >
> >Where am I wrong?
> >Using kdevelop on Linux
> >
> >(but that's the same just using g++ command line, while with gcc is
> >working..)






reply via email to

[Prev in Thread] Current Thread [Next in Thread]