静态链接到lib并且仍在请求DLL [英] Static linking to lib and still requesting DLL

查看:55
本文介绍了静态链接到lib并且仍在请求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 referenced 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 statically linked to my program?

推荐答案

并非所有 lib 文件都是静态库。一些是导入库,很可能就是与您链接的库。

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.

这篇关于静态链接到lib并且仍在请求DLL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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