[Lemon-user] Compiling "lp_demo.cc"
Alpár Jüttner
alpar at cs.elte.hu
Fri Aug 13 13:13:49 CEST 2010
Hi Andrea,
> Compilation done. Now, running lp_demo I get:
>
> ./lp_demo: error while loading shared libraries: libglpk.so.0: cannot
> open shared object file: Non such file or directory
Please, check if libglpk.so.0 is indeed there under /usr/local/lib. If
yes, then your system may not be correctly configured to use the stuff
installed under /usr/local, which is the case with some older linux
distros.
/usr/local/lib should be listed in /etc/ld.so.conf (but be aware that
this file can also include others). If it is not there, then you should
add it and then run ldconfig as root.
Alternatively, you can specify the search path when running the code,
like this:
$ export LD_LIBRARY_PATH=/usr/local/lib
$ ./lp_demo
or simply
$ LD_LIBRARY_PATH=/usr/local/lib ./lp_demo
I hope this helps.
Regards,
>
> Andrea
>
>
> Quoting Kovács Péter <kpeter at inf.elte.hu>:
>
> > Dear Andrea,
> >
> > For using the LP tools of LEMON you also need an LP solver. In your
> > current LEMON installation, GLPK is selected as the default solver. To
> > compile lp_demo.cc, you should have this library installed on your
> > system and you should add the -lglpk directive to gcc:
> >
> > g++ -o lp_demo lp_demo.cc -lemon -lglpk
> >
> > Regards,
> > Peter
> >
>
>
> ----------------------------------------------------------------
> SISSA Webmail https://webmail.sissa.it/
> Powered by Horde http://www.horde.org/
>
>
> _______________________________________________
> 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