如何在VC ++中添加外部库进行编译? [英] How do you add external libraries for compilation in VC++?

查看:120
本文介绍了如何在VC ++中添加外部库进行编译?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用了几个Visual C ++编译器(VC97,VC2005,VC2008),我没有真正找到一个清晰的方法添加外部库到我的构建。我来自Java背景,在Java库中是一切!

I've worked with a couple of Visual C++ compilers (VC97, VC2005, VC2008) and I haven't really found a clearcut way of adding external libraries to my builds. I come from a Java background, and in Java libraries are everything!

我理解从编译我的Linux上的开源项目,所有的库的源代码似乎需要包括,除了那些.so文件。

I understand from compiling open-source projects on my Linux box that all the source code for the library seems to need to be included, with the exception of those .so files.

我也听说过.lib静态库和.dll动态库,但我还是不知道如何将它们添加到构建和他们工作。

Also I've heard of the .lib static libraries and .dll dynamic libraries, but I'm still not entirely sure how to add them to a build and make them work. How does one go about this?

推荐答案

在我认为你可能会问如何添加一个lib到项目的机制/ solution in the IDEs ...

In I think you might be asking the mechanics of how to add a lib to a project/solution in the IDEs...

在2003年,2005年和2008年,它类似于:

In 2003, 2005 and 2008 it is something similar to:

从解决方案资源管理器 - 右键单击​​项目
选择属性(通常是最后一个)
我通常选择顶部的所有配置...
链接器
输入

from the solution explorer - right click on the project select properties (typically last one) I usually select all configurations at the top... Linker Input

其他的依赖关系在那里。

Additional dependencies go in there

我希望我可以做一个屏幕捕获。

I wish I could do a screen capture for this.

在VC6这是不同的熊与我,因为这是所有从内存

In VC6 it is different bear with me as this is all from memory

项目设置或属性,然后转到链接器选项卡,可以添加库。

project settings or properties and then go to the linker tab and find where the libs can be added.

请原谅这篇文章的随意性质。我想这是你想要的。

Please excuse the haphazard nature of this post. I think that is what you want though.

这篇关于如何在VC ++中添加外部库进行编译?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆