Actually my LD_LIBRARY_PATH is correct. Now I run: sudo make clean sudo ./configure --disable-shared sudo make install
I change Makefile to: g++ -lglpk -o TestLP TestLP.o BasicFunction.o CIDR.o (are you sure there this makefile is correct? No other options?) Still the same error: [sr...@obelix TestLP]$ ./TestLP ./TestLP: error while loading shared libraries: libglpk.so.0: cannot open shared object file: No such file or directory On Tue, Feb 23, 2010 at 5:19 PM, Andrew Makhorin <[email protected]> wrote: >> 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: >> [myn...@obelix 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. > > The following sequence works for me (Debian GNU/Linux Etch): > > $ cd glpk-4.43 > $ ./configure > $ make > $ make check > $ make install > $ cd .. > $ cp glpk-4.43/examples/sample.c sample.c > $ gcc sample.c -lglpk > $ export LD_LIBRARY_PATH="/usr/local/lib" > $ ./a.out > > If LD_LIBRARY_PATH is not correctly set, running a.out causes the > error you mentioned, i.e. "libglpk.so.0: cannot open shared object > file: No such file or directory". > > _______________________________________________ Help-glpk mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-glpk
