help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] Always running time error : " error while loading share


From: Guanyao Huang
Subject: Re: [Help-glpk] Always running time error : " error while loading shared libraries: libglpk.so.0:"
Date: Tue, 23 Feb 2010 10:51:14 -0800

Actually I already make install but I didnt post in the email.
OK.
Now:
sudo ./configure --prefix /usr
sudo make install prefix=/usr

Then make check works.
However, still there is a running time error for my program:
address@hidden TestLP]$ ./TestLP
./TestLP: error while loading shared libraries: libglpk.so.0: cannot
open shared object file: No such file or directory

If I dont specify the prefix /usr but let it to be /usr/local/, there
is still the same error.

As I said, global variables are already defined as:
declare -x LD_LIBRARY_PATH="/usr/lib"
declare -x LD_RUN_PATH="/usr/lib"
declare -x LIBDIR="/usr/lib"

I strongly suspect that it is a problem of  my Makefile for my own program.

Thanks.

On Mon, Feb 22, 2010 at 11:54 PM, Andrew Makhorin <address@hidden> wrote:
>> Sorry to bother us. I am a newbie to glpk. I am calling glpk lib from
>> my own c++ file. The c++ code is actually a test code copied from page
>> 15 of glpk.pdf.
>
>> I already configure to support dynamic lib. The commands I use are:
>> sudo ./configure --enable-dl=dlfcn --prefix /usr
>> sudo make install LDFLAGS+=-ldl prefix=/usr/
>> If I donot use LDFLAGS+=-ldl, there will be errors like:
>> ../src/.libs/libglpk.so: undefined reference to `dlsym'
>
> The option '--enable-dl' has sense only if it specified along with
> '--enable-odbc' and/or '--enable-mysql'. If you are not going to access
> external databases from mathprog models, you do not need to enable this
> feature.
>
>> sudo make check shows it is correctly installed.
>
> 'make check' does not install the package. To install the package you
> should run 'make install'.
>
>> sudo ./glpsol can also work
>
>> [...]
>
>> The source code gets compiled, but there is always a running time error:
>> address@hidden TestLP]$ ./TestLP
>> ./TestLP: error while loading shared libraries: libglpk.so.0: cannot
>> open shared object file: No such file or directory
>
> You should either install the package with 'make install' or make
> libglpk.so available on running your program.
>
> For more details please see file INSTALL or Appendix A in the glpk
> reference manual included in the distribution.
>
>




reply via email to

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