简体   繁体   中英

How to add DLL reference to a c++ project in a native application?

I want to reference some DLLs in my C++ project in VS2013. I searched and found out that it could be done by right-clicking on project node in solution explorer and select add reference. But when I did as said another window appeared instead of Reference Manager one. Where is the problem? How can I add my DLLs to my project rather than copying them in same folder with .exe output? The reference node also does not appear in solution explorer. I tried show it by clicking "show all files", but it still does not appear!

EDIT: I edited the title according to drescherjm`s comment.

我在项目节点上单击鼠标右键,然后选择“添加引用”。

在此处输入图片说明

In a native C++ project in Visual Studio in order to not copy the dlls in the folder of the executable you can right-click on the project -> properties -> Debug -> Enviroment and set the following variable: PATH=<folder where the dll is>;%PATH%

I'm not a great expert of C# but what I know is that in a .NET application, in order to use a component in your application , you need to add a reference to it. For default, the dll is locally copy and deployed with your application; to prevent this, you have to register the dll in the GAC( Global Assembly Cache ).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM