Problem due to linking of an external compiled file to my code
Hi,
I have a problem due to the dynamically linking of the external compiled file. Currently I'm trying to write API's for postgreSQL. For which I would require the libpq.so to be dynamically linked before execution. The problem is I'm unable to find the actual place that would take care of linking it before my file is getting called. I tried setting LD_PRELOAD env variable with the corresponding libpq.so This is not working. I'm not able to find the actual flow on how the libraries are used/loaded because I'm using an external hardware (Linux based). Is there any way to track how and when the libraries are loaded and how to make sure that this postgreSQL library is linked properly. Please help me out in solving this. Thanks in advance |
Hi,
Welcome to LQ! To be "dynamically linked" at run-time the library (same version) needs to be around at compile time; then it should be sought in /etc/ld.so.cache and the LD_LIBRARY path. Have a read of man ldd, man ldconfig, man ld.so ... Cheers, Tink |
All times are GMT -5. The time now is 06:40 PM. |