I want to use an additional library when compiling an application but I am not able to add the path to the library directory to LD_LIBRARY_PATH
hence it's not found by the build system:
I added the path to the library directory /etc/ld.so.conf.d
, in a new file petsc.conf which contains /home/klaus/OpenFOAM/klaus-5.0/petsc-3.7.6/arch-linux2-c-debug/lib
and when I run ldconfig -p
the library IS found but it doesn't appear in the LD_LIBRARY_PATH
I also added the path to .bashrc
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/klaus/OpenFOAM/klaus-5.0/petsc-3.7.6/arch-linux2-c-debug/lib
sourced it, later rebooted but when I check LD_LIBRARY_PATH
with
env | grep '^LD_LIBRARY_PATH'
the library is still not included and I get a compile error that it's not found (linked)
What needs to be done on top of these steps to add a library to LD_LIBRARY_PATH
?