静态库 vs.Windows平台导入库 [英] static library v.s. import library on Windows platform

查看:34
本文介绍了静态库 vs.Windows平台导入库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我怎么知道一个 .lib 文件是静态库还是静态库?DLL 的导入库?有什么工具或命令可以做到这一点吗?

How could I tell one .lib file is a static library v.s. an import library for a DLL? Is there any tool or command that could do this?

第二个问题是我如何检查静态库的依赖关系,我的意思是我如何知道这个静态库中包含哪些 DLL?

Second question is how could I check the dependencies of a static library, I mean how could I know which DLLs are included in this static library?

感谢您的帮助.

最好的问候,

推荐答案

导入库将向您的程序添加 DLL 依赖项.如果您没有 DLL,您的程序将无法启动.(您可以使用 Dependency Walker 来获取您的程序依赖的 DLL 的名称).

Import library will add a DLL dependency to your program. Your program won't start, if you don't have the DLL. (You may use Dependency Walker to get the names of the DLL's of your program depend on).

Afaik 静态库没有依赖项.它们链接到程序中,只有链接器错误会告诉您该特定库是否依赖于另一个库.(至少在 GCC 中,我不知道想要的是 MS 工具的行为.)

Afaik Static libraries do not have dependencies. They linked into the program, only linker errors will tell you if that particular library depends on another lib. (At least in GCC, I don't know want is the behaviors of the MS tools.)

这篇关于静态库 vs.Windows平台导入库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆