开发者

Visual C++ 2008: adding static libraries as relative address?

I'm adding the gtest libraries as with an absolute link to the project, but this wouldn't work on somebody else's machine if their source is downloaded elsewhere in the system. Is there a way to link to the .libs with relative address instead o开发者_如何学编程f absolute address? Thanks.


Just use a relative path; they work fine for lib file paths (and lib-folder paths in the project settings).

e.g. Instead of "C:\moo\cow.lib" you might put "..\..\moo\cow.lib" (depending on where you're starting from, of course).

(Edit: Fixed a \ char that got swallowed up.)

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜