linux - Tracing linked libraries -


I'm getting some errors which I think my Linux program is connecting to libraries that it's going to do. How do I get the full path for all linked libraries? I know ldd will name me, but how can I use it to get the full path?

Thank you.

Actually ldd whatever you want with the shared library dependency of your application Finding it gives full path with file name.

  $ ldd v8test linux-gate.so.1 = & gt; (0xb78b2000) libz.so.1 = & gt; /usr/lib/libz.so.1 (0xb787e000) librt.so.1 = & gt; /lib/i686/cmov/librt.so.1 (0xb7875000) libcppunit-1.12.so.1 = & gt; /usr/lib/libcppunit-1.12.so.1 (0xb782c000) libstdc ++ So.6 = & gt; /usr/lib/libstdc++.so.6 (0xb7604000) libm.so.6 = & gt; /lib/i686/cmov/libm.so.6 (0xb75dd000) libgcc_s.so.1 = & gt; /lib/libgcc_s.so.1 (0xb75bf000) libc.so.6 = & gt; /lib/i686/cmov/libc.so.6 (0xb7478000) libpthread.so.0 = & gt; /lib/i686/cmov/libpthread.so.0 (0xb745f000) libboost_system-mt.so.1.38.0 = & gt; /usr/lib/libboost_system-mt.so.1.38.0 (0xb745b000) /lib/ld-linux.so.2 (0xb78b3000) libdl.so.2 = & gt; /lib/i686/cmov/libdl.so.2 (0xb7456000) libboost_thread-mt.so.1.38.0 = & gt; /usr/lib/libboost_thread-mt.so.1.38.0 (0xb7383000) libboost_filesystem-mt.so.1.38.0 = & gt; /usr/lib/libboost_filesystem-mt.so.1.38.0 (0xb7370000) libtinyxml.so.1 = & gt; /home/dmitry/tinyxml/libtinyxml.so.1 (0xb7359000) libboost_regex-mt.so.1.38.0 = & gt; /usr/lib/libboost_regex-mt.so.1.38.0 (0xb728c000) libmysqlclient_r.so.15 = & gt; /usr/lib/libmysqlclient_r.so.15 (0xb70a1000) libicuuc.so.42 = & gt; /usr/lib/libicuuc.so.42 (0xb6f61000) libicudata.so.42 = & gt; /usr/lib/libicudata.so.42 (0xb601a000) libicui18n.so.42 = & gt; /usr/lib/libicui18n.so.42 (0xb5e6b000) libcrypt.so.1 = & gt; /lib/i686/cmov/libcrypt.so.1 (0xb5e39000) libnsl.so.1 = & gt; / Lib / i686 / cmov / libnsl.so.1 (0xb5e22000)  

The libraries have its sonum (such as Libobf_FileSystemMTo.1.38.0) code> / etc / ld. So.conf is set in binary by , LD_LIBRARY_PATH or rpath .

If Ldd is unable to find something that will be visible to it

  libicuuc.so.42 = & gt; Not found  

In this case, consider using a method to give the correct search path.

ldd to load the library due to some reason

  $ ldd v8test ./v8test: error while loading the shared library: / home / Dmitry / a / liba.so.2: Invalid ELF header  

Of course it can not protect you from errors in the library. In fact it is possible to rely on your Library A and B For both, on the basis of incompatible versions on some Library C. In this situation, your program has a good chance of accident (unless the library is C) - LDD is not going to warn you, but you should be able to see it in the output.

It will be useful to you. Also check on some options of

ldd or


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -