C++ 在 VS 2015 中编译和链接第三方库

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/31030556/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-28 13:50:50  来源:igfitidea点击:

Compiling and linking third party libraries in VS 2015

c++cvisual-studiovisual-studio-2015

提问by BugHunterUK

I'm working on a C++ project using Visual Studio 2015 I'm trying to link an external library (in this instance libtins). The library currently resides on my desktop.

我正在使用 Visual Studio 2015 处理 C++ 项目,我正在尝试链接外部库(在本例中libtins)。该库目前位于我的桌面上。

I've tried editing the project settings, under Linker settings, but it doesn't give me any option to include any custom libraries.

我试过在链接器设置下编辑项目设置,但它没有给我任何选项来包含任何自定义库。

How do I do this in VS 2015?

我如何在 VS 2015 中做到这一点?

回答by Proxytype

adding to the linker is not enough you need also to add the include library: properties -> C/C++ ->general -> additional include directories

添加到链接器是不够的,您还需要添加包含库:属性 -> C/C++ -> 常规 -> 附加包含目录