开发者

Linking a library with a project relative path in Visual studio 2008

Linking a library with a project rela开发者_运维知识库tive path in Visual studio 2008


It will by default set it to a relative path, if it's within your project directory. I've seen cases where that does break though (either older versions, or possibly when you move it around) so you should just be able to edit the .*proj file and manually change the path.

This question raises a flag for me though, since it seems like possibly you're linking to a non-standard .dll that is outside of your project, and thus not in source control. You should generally be able to check out a fresh copy of a project and compile it.. and if you're linking to random DLL files in specific locations that are not included, it's going to cause issues in the future..


use a relative path from your vcproj (or maybe sln) file. Alternatively, put this path into the library search path. Alternatively again, make it explicitly relative to one of the project macros (e.g. $(ProjectDir)). The list of these macros can be seen when you pop open the configuration item using the little dot-dot-dot icon on the right side of the field (then click "macros").

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜