C++Builder 中创建导入库的 IMPLIB 和 MKEXP 有什么区别?

发布于 2025-01-09 12:53:56 字数 614 浏览 3 评论 0原文

询问如何使用PathCchCanonicalizeEx 使用 C++Builder 10.2,我告诉使用工具创建缺失的导入库IMPLIBMKEXP。我已经测试了这两个应用程序,它们正在基于 Windows 10 的 KernelBase.dll 创建 lib 文件。不过,这两个文件内容看起来不同,它们以不同的标头开头,总体大小不同等。< code>MKEXP 文档为 从输入文件创建导入存档,但似乎没有解释其实际含义。

那么,什么时候使用这两个工具中的哪一个呢?目的有什么不同,他们如何工作,他们可能支持什么,等等?

After asking how to use PathCchCanonicalizeEx with C++Builder 10.2, I was told to create missing import libraries using the tools IMPLIB or MKEXP. I've tested both apps and they are creating lib files based on KernelBase.dll of my Windows 10. Though, both file contents look different, they start with different headers, are differently large overall etc. MKEXP documents to Creates an import archive from an input file, but doesn't seem to explain what that actually means.

So, when to use which of the both tools? What is the difference in purpose, how they work, possibly what they do support, etc?

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

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

发布评论

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

评论(2

七颜 2025-01-16 12:53:56

IMPLIB 用于生成导入库对于 32 位 DLL。

MKEXP用于生成 64 位 DLL 的导入库。

IMPLIB is for generating an import lib for a 32bit DLL.

MKEXP is for generating an import lib for a 64bit DLL.

琉璃繁缕 2025-01-16 12:53:56

IMPLIB 用于为 DLL 生成 32 位导入库,用于 32 位 Windows 构建。

MKEXP 用于为 DLL 生成 64 位导入库,用于 64 位 Windows 构建。

IMPLIB 创建的格式与 MKEXP 创建的格式不同,Borland 中的 32 位和 64 位链接器工具需要正确的格式才能理解它们。库本身只是在应用程序启动时加载 .DLL,因此除了“加载 DLL 并将内部静态函数链接到 DLL 中的函数”之外不包含任何其他内容。

使用 RADStudio 11,我发现我必须使用 -a 标志用于 32 位导入 OpenSSL,如下所示:

REM convert_openssl_libraries.bat
REM convert the 32-bit .lib libraries with -a flag to 
REM add the '_' at the beginning of the function names

implib -a libssl-3.lib libssl-3.dll
implib -a libcrypto-3.lib libcrypto-3.dll
implib -a legacy.lib legacy.dll

REM convert the 64 bit .a libraries

mkexp libssl-3-x64.a libssl-3-x64.dll
mkexp libcrypto-3-x64.a libcrypto-3-x64.dll
mkexp legacy-x64.a legacy-x64.dll

IMPLIB is for generating a 32-bit import lib for a DLL, for 32-bit Windows builds.

MKEXP is for generating a 64-bit import lib for a DLL, for 64-bit Windows builds.

The format created by IMPLIB is different than the format created by MKEXP, and the correct format is needed for the 32-bit and 64-bit linker tools in Borland to understand them. The lib itself simply loads the .DLL when your app starts so doesn't include anything else other than "load DLL and link the internal static functions to the ones in the DLL"

Using RADStudio 11, I found I had to use the -a flag for 32-bit importing OpenSSL, like this:

REM convert_openssl_libraries.bat
REM convert the 32-bit .lib libraries with -a flag to 
REM add the '_' at the beginning of the function names

implib -a libssl-3.lib libssl-3.dll
implib -a libcrypto-3.lib libcrypto-3.dll
implib -a legacy.lib legacy.dll

REM convert the 64 bit .a libraries

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