When building applications in Linux/C++, is there anyway to show which libraries have been linked in?
Sunday, October 4th, 2009 at
02:39
I would like to be able to see exactly which versions of various libraries are being used in my application executable.
Tagged with: libraries
Filed under: Linux Applications
Like this post? Subscribe to my RSS feed and get loads more!
If your application is using dynamic/shared libraries you can use
ldd MyApplication in the shell to find the libraries it depends on, i.e. which library stubs have been linked in. Static libraries, once linked, in are no longer listed in the application executable. Your only chance is to somehow force the linker to print out its libraries while it is linking. Take a look at this :
http://prefetch.net/blog/index.php/2007/01/13/viewing-the-files-the-runtime-linker-is-operating-on/