#pragma comment(lib) should be able to take relative paths from additional lib dirs - by Andrew McDonald

Status : 

  Fixed<br /><br />
		This item has been fixed in the current or upcoming version of this product.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 596828 Comments
Status Closed Workarounds
Type Suggestion Repros 0
Opened 9/10/2010 9:00:29 AM
Access Restriction Public


If you specify some folder path in "additional include directories" for a project, you can then #include a file using a relative path to that folder. But the same doesn't seem to apply to "additional library directories" when used with #pragma comment(lib). You always get a linker error that it can't find the file. It seems as though it's only looking for a file with that name in the additional lib folder, not concatenating the paths together then resolving the result.
Sign in to post a comment.
Posted by YongKang [MSFT] on 11/12/2010 at 9:40 AM
Thanks for the suggestion.

The problem has been fixed in our code and the fix will be included in our future release. For now the work around is to specify the exact directory (under the root of which the required lib exists) using /LIBPATH. Please contact Microsoft PSS if you need a hotfix of this issue for VS 2010.

Thank you,
VC++ CodeGen and Tools
Posted by Microsoft on 9/10/2010 at 5:01 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)