Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where do I input DLL dependencies in Visual Studio C++ project?

I am converting some Qt project files (.pro) that run on Linux and Mac into Visual Studio project files (.vcproj) The Qt Visual Studio add-in converted everything fine except the DLL dependencies. Where do I put these in Visual Studio 2008?

If I put the DLLs in Configuration Properties > Linker > Input > Additional Dependencies, I get:

fatal error LNK1107: invalid or corrupt file: cannot read at 0xABC

Where do dynamically-linked dependencies go?

like image 988
Dave Mateer Avatar asked Jun 03 '10 15:06

Dave Mateer


People also ask

How do I reference a DLL in Visual Studio C++?

In Visual C++, click the Browse tab in the Add References dialog box. Click Browse, locate the component that you want on your local drive, and then click OK. The component is added to the Selected Components field. In Visual C++, locate the component that you want on your local drive.

How do I run a DLL in Visual Studio?

Debug from the DLL project Set breakpoints in the DLL project. Right-click the DLL project and choose Set as Startup Project. Make sure the Solutions Configuration field is set to Debug. Press F5, click the green Start arrow, or select Debug > Start Debugging.


1 Answers

Project Properties -> Linker -> Input -> Additional Dependencies

In that field put xxxx.lib for whatever library you need.

like image 138
Ben Burnett Avatar answered Sep 22 '22 10:09

Ben Burnett