Click to See Complete Forum and Search --> : trouble with libraries


doublec16
03-05-2003, 06:23 PM
I have installed the pgplot library on my system, and I seem to be able to compile programs using the -lpgplot switch, and I have it in the directory with all the other libraries (/usr/local/lib), but when I try to run a demo program (included with the pgplot package) I get:

demo1: error while loading shared libraries: libpgplot.so: cannot open shared object file: No such file or directory

I have no idea why this isn't working. I also linked to the X11 library when I compiled yet it seems to be able to find that. Can anyone give me a clue as to why this doesn't work? Thanks.

binaryDigit
03-06-2003, 01:18 PM
http://www.dwheeler.com/program-library/Program-Library-HOWTO/shared-libraries.html

check LD_LIBRARY_PATH
run ldconfig -n <directory with shared libraries>

hope that helps

doublec16
03-10-2003, 02:29 PM
Thanks for that link. It had actually started working on its own before I saw your reply. I had already set the LD_LIBRARY_PATH variable, and the so files were in with all the other so files anyway. I don't know why it suddenly started working without me doing anything. One of the mysteries of life I guess....