如何检查LIB导入库是否与其DLL完全匹配?

发布于 2024-11-06 02:45:28 字数 118 浏览 3 评论 0原文

我有一个 DLL 及其导入库。当我尝试引用导入库时,出现链接器错误,某些函数无法解析。我认为 DLL 及其导入库的版本不匹配。 有没有办法检查导入库是否与其 DLL 完全匹配,而无需通过 DumpBin 手动检查大量函数?

I have a DLL with its import library. When I try to reference the import library, I get linker errors that some functions can't be resolved. I think that there is a mismatch in versions of the DLL and its import library.
Is there any way to check that an import library fully match its DLL, without checking tons of functions manually via DumpBin?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

依 靠 2024-11-13 02:45:28

问题在于头文件包含 .lib 文件中未定义的函数。您很可能有一个新的头文件和一个过时的 .lib 文件。

可能的解决方案:

The problem is that the header file contains functions that are not defined in the .lib file. Most likely you have a new header file and an out of date .lib file.

Possible solutions:

盗梦空间 2024-11-13 02:45:28

当您链接二进制文件时,只有 *.lib 库很重要(包括导入库,但显然不包括 DLL)。链接器甚至可能不知道它是导入库而不是其他静态库。还可以创建混合库,其中一些函数静态贡献给 *.lib 文件,而其他函数则从某些 DLL 导入。

您未解决的函数只是不存在于您的 *.lib 库(包括您的导入库)中。
如果您确实链接了导入库并且确定您的 DLL 导出了未解析的函数,那么您的导入库要么不匹配,要么已生成为不导出该函数(例如,这些函数可能未在 DLL 项目的 *.def 文件中列出) )。

When you link binary only *.lib libraries matter (including import libraries but obviously not including DLLs). The linker may even be unaware that it is import library and not some other static library. It is also possible to create mixed library with some functions statically contributed to the *.lib file and others imported from some DLL.

Your unresolved functions just not present in your *.lib libraries (including your import library).
If you do link your import library and know for sure that unresolved functions is exported by your DLL then your import library either mismatch or has been produced to not export that functions (e.g. the functions might be not listed in *.def file of DLL project).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文