Home Dashboard Directory Help

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


 as Fixed Help for as Fixed

Sign in
to vote
Type: Suggestion
ID: 596828
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 Microsoft 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)
Sign in to post a workaround.