c静态链接到lib并仍然请求DLL [英] c static linking to lib and still requesting DLL
问题描述
使用visual studio 2008,我有一个.H和一个.LIB文件的库。
我写了一个程序,并通过项目属性退出了LIB。
它编译好,但运行时,它要求安装DLL。
如果DLL与EXE的工作原理相同,但是如果我有LIB,这是不是意味着这些函数是静态链接到我的程序?
Using visual studio 2008, I have an .H and a .LIB file of a library. I wrote a program and refrenced the LIB via the project properties. It compiles fine, but when it runs, it asks for the DLL to be installed. If the DLL is in the same dir as the EXE it works ... but, if I have the LIB, doesn't it already mean the functions are staticly linked to my program?
谢谢
推荐答案
不是全部
文件是静态库。有些是导入库,可能的是,这是你链接的。
Not all lib
files are static libraries. Some are import libraries, and chances are, that's what you linked with.
如果你的 lib
文件小得多比其相应的 dll
文件,这是一个确定的标志,它是一个导入库。
If your lib
file is much smaller than its corresponding dll
file, that's a sure sign that it's an import library.
这篇关于c静态链接到lib并仍然请求DLL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!