Hi, everyone.
I am working on a project that involves using a few shared libraries. I use a make file to link these libraries.
During compilation and linking I get no errors, everything goes smoothly but when I try to run my program I get the following error:
"error while loading shared libraries: liblog4cxx.so.10: cannot open shared object file: No such file or directory"
In my make file I specify liblog4cxx.so to be linked.
My question is what is this "liblog4cxx.so.10".
I tried also including that in my make file, but during compilation the linker gives me this error:
"/usr/bin/ld: cannot find -llog4cxx.so"
Now, I can see that this file exists by looking in the directory.
And, I know that my make file is correct because I have four other libraries that work fine.
I understand that this is a very vague question, but I'm just looking for ideas here of what may be the problem.
LD_LIBRARY_PATH gets set in the make file. And even if it didn't then the linker would complain when it is linking. In my case the error occurs at run time.
Another thing is that, if in my make file I put a bad path to the library in question then the linker tells me it cannot find the library. But when the path is right it works and links. That tells me that the linker finds the library.
The problem is why can't the library actually be loaded.
What could be a possible cause for a dynamic .so library not being able to be loaded after having been linked?