I have a C++ application that I inherited, which consists of:
As far as I know, not much information about static libraries is preserved when linking (since the linker just sees that library as a collection of *.o objects anyway).
If you find the make command that links the final executable and add a -v
flag, g++
will show you exactly how it calls the ld
command. This should include all necessary static libraries, including libraries used by other libraries, or otherwise the link step would fail. But it might also include extra libraries that aren't actually used.
Another possibly useful thing is that, at least on Linux, objects and executables usually store names of the source code files from which they were created. (Filename only, no path.) Try
objdump -t executable | grep '*ABS*'