How do I change a Visual C++ project from a static lib to a DLL in a VS2010 solution

MDKIMZEY
MDKIMZEY used Ask the Experts™
on
I have a working Visual Studio 2010 solution with two projects.  The main project includes the second project as a reference.  


I converted the second project from a static LIB to a DLL.  I removed the original reference from the main project in the solution and re-added it.  The second project DLL successfully builds and lands in the Release and Debug folders.

When I build the solution I now get a linker error:

LNK1181: cannot open input file C:\Release\MyLib.Lib

When I inspect the linker command line, it still references the LIB file instead of the DLL.

Is there a linker setting that should be changed to recognize the DLL?

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2012
Commented:
The DLL it refers to the so called "import library" (http://msdn.microsoft.com/en-US/library/f0z8kac4%28v=VS.100%29.aspx - sums that up) which is created when building the DLL, you'll find it in the same folder as the DLL itself. Just copy it to the folder where your other project expects it and you will be fine.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial