[Lemon-user] I have a problem using Lp
Attila Bernáth
athos at cs.elte.hu
Fri Mar 30 16:39:03 CEST 2012
Hello!
Is GLPK installed to your computer?
Furthermore: for the Hao-Orlin algorithm, you don't need lp solvers
(while for lp_maxflow_demo.cc you do).
Attila
NGUYEN Vu Ngoc Tung <nvntung at gmail.com> írta (2012. március 30. 16:20):
> Hello,
>
> I are discovering your library to use in my work. In fact, I need to
> understand how Hao-Orlin algorithm works.
>
> When I have tested the lp_demo.cc, g++ doesn't recognize Lp as a type in the
> library.
> I complied with the following command:
> g++ -o lp_maxflow_demo lp_maxflow_demo.cc -lemon
>
> And the below lines are errors:
> lp_maxflow_demo.cc: In function ‘double maxFlow(const GR&, const CAP&,
> typename GR::Node, typename GR::Node)’:
> lp_maxflow_demo.cc:34: error: ‘Lp’ was not declared in this scope
> lp_maxflow_demo.cc:34: error: expected ‘;’ before ‘lp’
> lp_maxflow_demo.cc:37: error: ‘Lp’ cannot appear in a constant-expression
> lp_maxflow_demo.cc:37: error: parse error in template argument list
> lp_maxflow_demo.cc:38: error: ‘lp’ was not declared in this scope
> lp_maxflow_demo.cc:49: error: ‘Lp’ is not a class or namespace
> lp_maxflow_demo.cc:49: error: expected ‘;’ before ‘e’
> lp_maxflow_demo.cc:50: error: ‘e’ was not declared in this scope
> lp_maxflow_demo.cc:51: error: ‘e’ was not declared in this scope
> lp_maxflow_demo.cc:52: error: ‘e’ was not declared in this scope
> lp_maxflow_demo.cc:56: error: ‘Lp’ is not a class or namespace
> lp_maxflow_demo.cc:56: error: expected ‘;’ before ‘o’
> lp_maxflow_demo.cc:57: error: ‘o’ was not declared in this scope
> lp_maxflow_demo.cc:58: error: ‘o’ was not declared in this scope
> lp_maxflow_demo.cc:60: error: ‘o’ was not declared in this scope
>
> Finally, I decided to replace Lp by GlpkLp with #include <lemon/glpk.h>.
> With the same compile, I have received the following errors:
> /tmp/cc9sYeWZ.o: In function `main':
> lp_demo.cc:(.text+0x19): undefined reference to `lemon::GlpkLp::GlpkLp()'
> /tmp/cc9sYeWZ.o: In function `lemon::GlpkLp::~GlpkLp()':
> lp_demo.cc:(.text._ZN5lemon6GlpkLpD1Ev[lemon::GlpkLp::~GlpkLp()]+0x22):
> undefined reference to `vtable for lemon::GlpkLp'
> lp_demo.cc:(.text._ZN5lemon6GlpkLpD1Ev[lemon::GlpkLp::~GlpkLp()]+0x3a):
> undefined reference to `vtable for lemon::GlpkLp'
> lp_demo.cc:(.text._ZN5lemon6GlpkLpD1Ev[lemon::GlpkLp::~GlpkLp()]+0x42):
> undefined reference to `vtable for lemon::GlpkLp'
> lp_demo.cc:(.text._ZN5lemon6GlpkLpD1Ev[lemon::GlpkLp::~GlpkLp()]+0x95):
> undefined reference to `VTT for lemon::GlpkLp'
> lp_demo.cc:(.text._ZN5lemon6GlpkLpD1Ev[lemon::GlpkLp::~GlpkLp()]+0xac):
> undefined reference to `lemon::GlpkBase::~GlpkBase()'
> lp_demo.cc:(.text._ZN5lemon6GlpkLpD1Ev[lemon::GlpkLp::~GlpkLp()]+0xb9):
> undefined reference to `VTT for lemon::GlpkLp'
> lp_demo.cc:(.text._ZN5lemon6GlpkLpD1Ev[lemon::GlpkLp::~GlpkLp()]+0xd0):
> undefined reference to `lemon::GlpkBase::~GlpkBase()'
> lp_demo.cc:(.text._ZN5lemon6GlpkLpD1Ev[lemon::GlpkLp::~GlpkLp()]+0xdc):
> undefined reference to `VTT for lemon::GlpkLp'
> lp_demo.cc:(.text._ZN5lemon6GlpkLpD1Ev[lemon::GlpkLp::~GlpkLp()]+0xfc):
> undefined reference to `VTT for lemon::GlpkLp'
> collect2: ld returned 1 exit status
>
>
> I am appreciated your help.
>
> Thanks a lot.
>
> --
> NGUYEN Vu Ngoc Tung
> PhD Student - Bordeaux 1 University (2010 - 2013)
> LaBRI (Laboratoire Bordelais de Recherche en Informatique)
> Mobile: (+33) 07 62 71 09 34
>
>
> _______________________________________________
> Lemon-user mailing list
> Lemon-user at lemon.cs.elte.hu
> http://lemon.cs.elte.hu/mailman/listinfo/lemon-user
>
More information about the Lemon-user
mailing list