How to list dependencies of c/c++ static library?

前端 未结 2 1435
南方客
南方客 2021-02-19 08:16

For a static library (.a file), how to list the module-level dependencies of it?

I know for a shared library (.so), we can use objdump or readelf to do

2条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-19 08:51

    A static library have no such list of dependencies.

    A static library is nothing more than an archive of object files. And as object files doesn't know what libraries they depend on, neither can a static library.

提交回复
热议问题