如何向Visual Studio项目中添加其他库? [英] How to add additional libraries to Visual Studio project?

查看:100
本文介绍了如何向Visual Studio项目中添加其他库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Allergro是一个开放源代码的C ++插件库,用于图形处理.如何将这个库添加到我的编译器中?

Allergro is an open souce C++ addon library for graphics manipulation. How do I add this library to my compiler?

该说明对我不起作用,因为我使用Windows7.我不知道该操作系统是否重要.我有Visual Studio Express Edition.该库是一个.dll文件.如何将其添加到我的项目中?

The instructions don't work for me as I have Windows 7. I don't know if the OS matters. I have the Visual Studio Express Edition. The library is a .dll file. How do I add it to my projects?

推荐答案

对于Visual Studio,您需要在解决方案资源管理器中右键单击您的项目,然后单击属性.

For Visual Studio you'll want to right click on your project in the solution explorer and then click on Properties.

下一步打开配置属性,然后打开链接器.

Next open Configuration Properties and then Linker.

现在,您要将Allegro库所在的文件夹添加到其他库目录

Now you want to add the folder you have the Allegro libraries in to Additional Library Directories,

链接器-> 输入,您将在其他依赖项下添加实际的库文件.

Linker -> Input you'll add the actual library files under Additional Dependencies.

对于头文件,您还希望将其目录包括在 C/C ++ -> 其他包含目录下.

For the Header Files you'll also want to include their directories under C/C++ -> Additional Include Directories.

如果有dll,请在您的主项目文件夹中复制它并完成.

If there is a dll have a copy of it in your main project folder, and done.

我建议将Allegro文件放在您的项目文件夹中,然后将本地引用用于库和标头目录.

I would recommend putting the Allegro files in the your project folder and then using local references in for the library and header directories.

这样做可以让您在其他计算机上运行该应用程序,而不必在其他计算机上安装Allergo.

Doing this will allow you to run the application on other computers without having to install Allergo on the other computer.

这是为Visual Studio 2008编写的.对于2010,它应该大致相同.

This was written for Visual Studio 2008. For 2010 it should be roughly the same.

这篇关于如何向Visual Studio项目中添加其他库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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