静态库依赖 [英] static library dependencies

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

问题描述

我在Windows平台上有一个静态库(.lib文件),我想知道构建lib时CRT库的依赖版本。我没有.lib文件的源代码,有什么想法吗?

I have a static library (.lib file) on Windows platform, I want to know the dependent version of CRT library when the lib is built. I have no source code of the .lib file, any ideas?

预先感谢,
George

thanks in advance, George

推荐答案

静态库没有这些依赖。构建该库后,它不会以任何方式与运行时链接,它所了解的只是实现标头文件中的函数声明,这些声明不提供任何版本信息。

Static libraries don't have those kinds of dependencies. When the library is built it is not linked with the run-time in any way, all it knows about are function declarations in the implementation header files, which don't provide any version information.

但是,假设库是MS格式的,则应该通过在文本编辑器中打开库(在执行备份之前进行备份)来查看库的构建标志。您正在寻找这样的一行:

However, assuming the library is in MS format, you should be able see what flags the library was built with by opening it in a text editor (make a backup before you do this). You are looking for a line like this:

cl.exe cmd -nologo -MTd -W3 -Gm -GX -ZI -DWIN32 -D_DEBUG  (more stuff)

-MTd标志告诉您该库是使用Multi-线程调试支持。

The -MTd flag tells you that the library was compiled with Multi-Threaded Debug support. .

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

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