I am trying to run a C++ program which uses a static library libprun.a . During compilation, I am loading this library file using a environment variable as below.
I am not getting any errors during compilation or during running the binary in the same environment in which I compiled the binary but I am getting below error when running in a different environment as $CUSTOM_PATH is set to a different path.
I am getting errors only with libprun.a but not with other libraries.
What different environment are you talking about? Are you talking about just using a different setting for CUSTOM_PATH ? Are you talking about different operating systems? ???
How is CUSTOM_PATH set when your code works?
How is CUSTOM_PATH set when your code does not work?
Does the file $CUSTOM_PATH/lib/libprun.a exist in the environment when your code does not work?
error while loading shared libraries: /home/dev/lib/libprun.a: cannot open shared object file: No such file or directory.
2) What different environment are you talking about? Are you talking about just using a different setting for CUSTOM_PATH ? Are you talking about different operating systems? ???
3) How is CUSTOM_PATH set when your code works?
5) Does the file $CUSTOM_PATH/lib/libprun.a exist in the environment when your code does not work?