开发者

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

开发者 https://www.devze.com 2023-01-28 01:05 出处:网络
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 li

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

精彩评论

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