静态库以加载动态库 [英] static library to load dynamic library

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

问题描述

大家好,

如何获得静态链接库以加载动态链接库? :confused:

例如
DirectX库可以做到这一点,我想知道如何才能做到这一点.

我正在使用Visual Studio2010.
当我尝试仅链接到生成的lib时,我可以删除dll,没有问题,但是当我仅添加对项目的引用,然后尝试删除dll时,会出现一条消息,指出???.dll不存在.

如何链接到静态库,然后为我加载dll?
这样,我就不必为别人使用dll而分发我的完整项目.

我知道这里的人比我更多,所以对C ++的了解更多,所以只要指出这里有什么问题,

感谢您的回答.:thumbsup:

永不说永不,
因为Never不会太早.

Hi All,

How do I get a static link library to load a dynamic link library? :confused:

Eg.
The DirectX libs do that and I was wondering how I can do the same.

I am using visual studio 2010.
When I tried just linking to the generated lib I could delete the dll and there was no problem but when I just add reference to the project and then I try deleteing dll, there is a message saying the ???.dll does not exist.

How do I link to the static library that then loads the dll for me?
That way I dont have to hand out my full project for someone else to use the dlls.

I know there are lot''s more people here MORE knowldgeble on C++ than me, so just point out any thing that is wrong here,

Thanks for the answers.:thumbsup:

Never say Never,
Because Never comes too soon.

推荐答案

您的问题根本不是很清楚.您是在创建供客户端使用的dll还是在使用第三方dll?
看来您正在开发dll,但不知道确切分发什么,对吗?如果是,则必须提供生成的.lib文件,头文件和dll.

如果这不能回答您的问题,请澄清您的问题,因为它暂时没有太大意义.
Your question isn''t really clear at all. Are you creating a dll for your client to use or are you using a third-party dll ?
It seems that you are developping a dll and do not know exactly what to distribute, am I right ? If yes, you have to supply the generated .lib file, the headers files and the dll.

If this doesn''t answer your question, please clarify your question because it doesn''t make too much sense right now.


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

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