static library dependencies

早过忘川 提交于 2020-01-12 09:49:37

问题


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?

thanks in advance, George


回答1:


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.

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)

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



来源:https://stackoverflow.com/questions/806197/static-library-dependencies

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!