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.
Please suggest
Last edited by Don Cragun; 03-28-2016 at 02:24 AM..
Reason: Add CODE and ICODE tags.
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.
Please suggest
You haven't given us much to go on here...
What "below error" are you getting?
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?
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? ???
Quote:
Yes, Different Setting for CUSTOM_PATH
3) How is CUSTOM_PATH set when your code works?
Quote:
I have set CUSTOM_PATH to /home/dev/ in my environment but this variable may differ in Testing environment for e.g.
My Environment $CUSTOM_PATH=/home/dev/
Testing Environment $CUSTOM_PATH=/home/test/
5) Does the file $CUSTOM_PATH/lib/libprun.a exist in the environment when your code does not work?
Quote:
File exists in below paths
/home/dev/lib/libprun.a (Development)
/home/test/lib/libprun.a (Testing)
Development path is hardcoded after compiling, as /home/dev/lib/libprun.a this is not accessible from Testing Environment, its throwing above error.
Here is the output which I am getting for the above piece of code.
Quote:
/home/test/lib:
-rwxr-xr-x 1 divcst1 generic 44345 Mar 7 13:26 /home/test/lib/libprun.a
/home/test/lib/libprun.a: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, not stripped
/home/dev/lib:
ls: cannot access /home/dev/lib/libprun.*: No such file or directory
/home/dev/lib/libprun.*: cannot open `/home/dev/lib/libprun.*' (No such file or directory)
Hello,
I am trying to run a program from my local account and receive the following error:
/local/app: error while loading shared libraries: libtiff.so.3: cannot open shared object file: No such file or directory
On the root account (which I DO NOT have access to), I see that libtiff.so.4... (3 Replies)
Hi All,
I have RHEL 5 installed in my system. Something must has happened because when i reboot the server, it came with many error..
/usr/bin/rhgb-client -- error while loading shared libraries: libpopt.so.0. Can't open shared object files. No such file/directory
It finnaly ends with the... (6 Replies)
Help!
I'm busy working on MySQL replication for the site and trying to unzip this bind-geodns xz file on Linux (ubuntu) and am having some problems.
http://distro.ibiblio.org/pub/linux/distributions/archlinux/community/os/i686/bind-geodns-9.4.1-4-i686.pkg.tar.xz
Could anyone kindly unzip... (4 Replies)
Hi,
Can any one help me ,how to rectify the below problem?........
"error while loading shared libraries: libxerces-c.so.28: cannot open shared object file: No such file or directory"
Im using "ubuntu 10.04" (64 bit) (0 Replies)
Hi All,
I have RHEL 5 installed in my system. Something must has happened because when i reboot the server, it came with many error..
/usr/bin/rhgb-client -- error while loading shared libraries: libpopt.so.0. Can't open shared object files. No such file/directory
It finnaly ends with the... (0 Replies)
How do i make a library shared
say i have a library a.so which i have just compiled.
I want to make it shared how do i make it
Next Queation is what is the difference between a.so.0 a.so.1 a.so.2 & a.so :rolleyes: (1 Reply)
HI,
I am dynamically loading shared libraries using shl_load(). There are multiple processes (50 or more) which loads the same shared library. Will Unix internally load only one copy of the shared library or it will load multiple copies.
Can I have memory issues if this is done.
Thanks,... (1 Reply)
I have a doubt about the shared libraries. Where do you set the path for the shared libaries, for the dynamic loader to locate. Any suggestion would be of great help. thanks (3 Replies)
Hello everybody,
I am having major problems at the moment with shared libraries and I have to little knowledge of them to solve them. So please, please help me :)
Ok this is the problem:
I have a library A, which uses B and C, and C uses again D.
If I try to run A as plugin in apache,... (0 Replies)