包括dll在visual studio c ++ 2008

编程入门 行业动态 更新时间:2024-10-22 11:37:02
本文介绍了包括dll在visual studio c ++ 2008的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

有一种方法来包括dll在一个项目,所以我不要把这些DLL在同一个文件夹中我的可执行文件编译后。 这种方式我可以与他们编译我的项目。这是一个可能性,如果是有人可以指导我。

Is there a way to include dlls in a project so that I don'thave to put those dlls in the same folder with my executable after compiling. This way I could just compile my project with them. Is this a possibility and if yes could someone guide me.

我的项目是一个opencv项目,有很多dll,我必须包括在文件夹,不知道他们是否是.NET程序集,因为我读了另一篇文章说,它可以用.NET程序集dll。

My project is an opencv project and there are many dlls that I would have to include in the folder, and I don't know whether they are .NET assemblies or not, since I read an other post which said that it can be done with .NET assembly dlls.

推荐答案

我理解你想做的是部署你的exe文件及其依赖(dll),但你也希望它在项目中配置。您可以将项目配置为使用静态库,而不必担心分发DLL,因为它们已经内置到exe中。

I understand that what you wish to do is to deploy your exe file along with its dependencies (dlls), but you also want it to be configured in the project. You can configure your project to use static libraries instead and you don't have to worry about distributing your DLLs because they are already built into the exe.

如果您希望使用DLL,因为您不想膨胀您的exe,那么您的代码将必须实现其加载,即调用LoadLibrary函数和必要的调用具体出口功能。一旦你的代码实现了DLL的加载,然后你可以按照你所描述的方式部署它们。

If you wish to use DLLs because you do not want to bloat your exe then your code will have to implement its loading, i.e. calling LoadLibrary function and the necessary calls to the specific export functions. Once your code has implemented the loading of the DLLs then you can deploy them the way you described.

更多推荐

包括dll在visual studio c ++ 2008

本文发布于:2023-11-13 14:34:22,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1584587.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:visual   dll   studio

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!