Radek
2nd January 2014, 17:13
Because of bugs, I was forced to download, fix and compile a shared library. Trying to run an application from the Creator, I am now getting an error:
/home/radek/Desktop/C++/project/repdf-debug/repdf-qt: error while loading shared libraries: libpodofo.so.0.9.1: cannot open shared object file: No such file or directory
But the library exists for sure. In /home/radek/podofo/lib are sitting libpodofo.so (a link) and libpodofo.so.0.9.1 side by side. My *.pro file now contains:
LIBS += /home/radek/podofo/lib/libpodofo.so
I have checked (using Krusader) that there are no hidden blanks around the name, that the link is a valid link, that the library looks like a shared library, that the access rights both of the link and the library are the same as usual access rights from /usr/lib and that I am the owner both of the link and of the library. I also tried to reference the library directly:
LIBS += /home/radek/podofo/lib/libpodofo.so.0.9.1
Nothing helps. No such file or directory. What is happening?
-----------------------------------
Never mind, problem solved. It's a matter of libpath, the directory specified in LIBS seems to be irrelevant at runtime. So I created "mylib" folder in /home/radek, a /etc/ld.so.d/mine.conf file containing /home/radek/mylib, copied libpodofo.so files there, updated the profile file. It works now.
/home/radek/Desktop/C++/project/repdf-debug/repdf-qt: error while loading shared libraries: libpodofo.so.0.9.1: cannot open shared object file: No such file or directory
But the library exists for sure. In /home/radek/podofo/lib are sitting libpodofo.so (a link) and libpodofo.so.0.9.1 side by side. My *.pro file now contains:
LIBS += /home/radek/podofo/lib/libpodofo.so
I have checked (using Krusader) that there are no hidden blanks around the name, that the link is a valid link, that the library looks like a shared library, that the access rights both of the link and the library are the same as usual access rights from /usr/lib and that I am the owner both of the link and of the library. I also tried to reference the library directly:
LIBS += /home/radek/podofo/lib/libpodofo.so.0.9.1
Nothing helps. No such file or directory. What is happening?
-----------------------------------
Never mind, problem solved. It's a matter of libpath, the directory specified in LIBS seems to be irrelevant at runtime. So I created "mylib" folder in /home/radek, a /etc/ld.so.d/mine.conf file containing /home/radek/mylib, copied libpodofo.so files there, updated the profile file. It works now.