Solved

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

Posted on 2011-09-06
1
511 Views
Last Modified: 2012-05-12
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?

0
Comment
Question by:MDKIMZEY
1 Comment
 
LVL 86

Accepted Solution

by:
jkr earned 500 total points
ID: 36490069
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.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
TTimer no longer functioning 7 84
What is sub-make ? 2 37
max float value 3 21
Embarcadero C++ Builder XE10.1 Berlin red arrow Indicator 2 13
Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now