How can I add a .dll
in Visual Studio 2010? I just cannot find the option there.
To create a DLL project in Visual Studio 2017On the menu bar, choose File > New > Project to open the New Project dialog box. In the left pane of the New Project dialog box, select Installed > Visual C++ > Windows Desktop. In the center pane, select Dynamic-Link Library (DLL).
Using Visual C++ .In Solution Explorer, select the project. On the Project menu, click Add References. In Visual C++, click References on the Project menu, and then click Add New Reference. In the Add References dialog box, click the tab that corresponds with the category that you want to add a reference to.
On Windows you do not link with a .dll
file directly – you must use the accompanying .lib
file instead. To do that go to Project -> Properties -> Configuration Properties -> Linker -> Additional Dependencies
and add path to your .lib as a next line.
You also must make sure that the .dll
file is either in the directory contained by the %PATH%
environment variable or that its copy is in Output Directory
(by default, this is Debug\Release
under your project's folder).
If you don't have access to the .lib
file, one alternative is to load the .dll
manually during runtime using WINAPI functions such as LoadLibrary and GetProcAddress.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With