Search

"Link Library Dependencies" does not work by TonyHBCS

Closed
as By Design Help for as By Design

3
0
Sign in
to vote
Type: Bug
ID: 586113
Opened: 8/13/2010 8:48:01 AM
Access Restriction: Public
0
Workaround(s)
4
User(s) can reproduce this bug
Setting "Link Library Dependencies" to "Yes" does not work: Unresolved externals result. Only when the static library is added manually to the project does the library get linked.
Details (expand)

Visual Studio/Silverlight/Tooling version

Visual Studio 2010

What category (if any) best represents this feedback?

 

Steps to reproduce

Create a solution with an executable that is dependent on a static library (also in the solution as a project). Set the "Linker/General/Link Library Dependency" option to yes but do not add the dependent library manually to the executable project. Build the executable.

Product Language

English

Operating System

Windows XP

Operating System Language

English

Actual results

Unresolved externals pertaining to dependent static library.

Expected results

Linking with the dependent static library.
File Attachments
0 attachments
Sign in to post a comment.
Posted by Martin Ba. _ on 10/7/2011 at 2:38 AM
The answer posted by Amit Mohindra (8/23/2010) is either seriously under explained or seriously wrong.

The title of this bug reads: ["Link Library Dependencies" does not work] which is in fact true. It doesn't do what it used to do. Actually it appears it does nothing (http://stackoverflow.com/questions/7683869/what-does-the-link-library-dependency-linker-option-actually-do-in-visual-studi).

If this option does nothing, then it is a bug (remove it FCS!)
If this option does something, please explain what.
Posted by Dirk De Baer on 10/6/2010 at 7:22 AM
In Visual Studio 10 I experienced the same issue: although the dependency to the library was set with "project dependencies" and the "Link Library Dependencies" flag is set to "Yes", the library is NOT linked in. This behaviour is different from previous versions of Visual Studio, and not according to the documentation which says:

"Gives you the choice of linking in the .lib files that are produced by dependent projects. Typically, you will want to link in the .lib file."
Posted by Microsoft on 8/23/2010 at 5:14 PM
Hi Tony,

Thanks for reporting this feedback. The issue you are experiencing is by design. "Link Library Dependency" is a flag that only dictates whether or not to pass the library as an input to the linker. It does not find the dependency automatically. As a customer you will have to define the depedency manually as you suggest.

Thanks,
Amit Mohindra
Visual C++ Team
Posted by Microsoft on 8/13/2010 at 8:40 PM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.