Search

LIB file not output to DLL output directory, no config choice by WxsOnline

Closed
as By Design Help for as By Design

1
0
Sign in
to vote
Type: Bug
ID: 510558
Opened: 11/14/2009 6:49:22 AM
Access Restriction: Public
0
Workaround(s)
0
User(s) can reproduce this bug
When I created my DLL project in Visual Studio 2008, I was able to specify another folder to output the DLL to, and where to output it's companion LIB file when the project was built. By default, the LIB file would be placed in the same directory as the DLL. There was no such option in Visual Studio 2010 and the LIB file was placed in my output directory ("make_msvc10/_output/Galaxy.LIB") whereas my DLL was placed properly in the intended target directory ("lib/win32/Galaxy.DLL"). It would be nice to be able to set a specific seperate path for the output LIB file, but at the least it should be placed in the same place as the DLL when no alternate path is specified (i.e. should use $(TargetPath)$(ProjectName).LIB or something along those lines.

Right now I have to add a post-build event ("copy .\_output\*.lib ..\lib\win32\*.lib")
Details (expand)

Product Language

English

Version

Visual Studio 2010 Beta 2

Operating System

Windows XP

Operating System Language

English

Steps to Reproduce

Create a DLL project.
Specify an output directory:
./_output/
Specify a seperate output directory for the DLL:
../lib/win32/Foo.dll (release)
../lib/win32_d/Foo_d.dll (debug)
Build the project.

Actual Results

The .LIB file is created in ./_output/Foo.LIB while the .DLL is placed in the expected ../lib/win32/Foo.DLL.

Expected Results

Since there is no project property to specify where to output the DLL's companion static .LIB library, and VC++ 2008 always output the .LIB in the same place as the .DLL, I expected VS2010 would output the .LIB file to the same folder as the .DLL.
      You can indicate your satisfaction with how Microsoft handled this issue by completing this quick 3 question survey. [Details]

 

File Attachments
0 attachments
Sign in to post a comment.
Posted by Li Shao [MSFT] on 2/5/2010 at 4:17 PM
You can specify where you would like to place the lib at linker-> Advanced -> Import Library. Conversion does not try to figure out where the Lib file should be and it is placed to $(OutDir) by default. If you did not change the default output directory for the dll file before the conversion, Lib will be put in the same directory as the dll file. In your case, since you have changed the dll's output directory, you will need to change the Lib directory after the conversion.
Posted by WxsOnline on 12/24/2009 at 6:02 PM
I believe you misunderstand the problem. The IDE does not allow me to choose a place to place my lib (such as in the same directory as the DLL), nor does it place it in the same directory as the DLL by default. This is a problem whether intended or not: since the DLL requires the LIB file in order to be used by another application, it makes sense to either output the LIB file to the same path as the DLL or to give us the option of where to output the DLL's accompanying LIB. This was the behavior in 2008—it does not make sense to continue the feature of choosing the DLL's output directory, then cause a warning because the user does so and it is no longer found in the same folder as its required .LIB redistributable.
Posted by Microsoft on 12/17/2009 at 9:49 AM
Thank you for your feedback. When the target name/target path do not match, such as in your case, we do issue a warning in the Build Log, thus informing the user of this mismatch. Currently, this behavior is By Design. Thank you!

Richa Prasad
Program Manager
Visual Studio Platform Team
Posted by Microsoft on 11/16/2009 at 12:46 AM
Thanks for your feedback.

We are routing this issue to the appropriate group within the Visual Studio Product Team for triage and resolution.
These specialized experts will follow-up with your issue.
Sign in to post a workaround.