如何包含dll作为相对路径? [英] How to include dll as relative path?

查看:210
本文介绍了如何包含dll作为相对路径?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的项目中有一个dll,我通过绝对路径(C:\test\something\abc.dll)引用该dll加载到我的项目中。

I have a dll in my project which I am referring through absolute path(C:\test\something\abc.dll) to load in my project. How do load it relatively or is there is better way to include it in visual studio project?

推荐答案

您可以指定相对应的dll名称,而不用其他方式加载它吗?将dll路径放置在可执行文件加载所在的目录中,或放置在当前目录(启动程序的目录)中。

You can specify dll name without path and place the dll in the same directory where the executable loading it resides, or in the current directory (the one from which you launch the program).

这篇关于如何包含dll作为相对路径?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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