如何在Visaul Studio中安装新图书馆? [英] how to instal new library in visaul studio ?

查看:49
本文介绍了如何在Visaul Studio中安装新图书馆?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要添加#include< gl \ glut.h>在visal studio

i want add #include<gl\glut.h> in visal studio

推荐答案

这是一个误解.当您在Visual Studio中执行安装时,切勿安装任何工具.您需要了解链接库的内容:
http://en.wikipedia.org/wiki/Linker_%28computing%29 [ ^ ],
http://en.wikipedia.org/wiki/Library_%28computing%29 [ ^ ].

—SA
This is a misconception. You never install anything in Visual Studio when you do it. You need to understand what is linking a library:
http://en.wikipedia.org/wiki/Linker_%28computing%29[^],
http://en.wikipedia.org/wiki/Library_%28computing%29[^].

—SA


将.h,.lib和.dll(如果有)粘贴在某个地方.我建议您在与代码所在位置平行的位置,以便找到具有相对路径的文件

一切

-扩展环境(用于查找DLL),LIB和INCLUDE的环境,以包括转储文件的路径,然后将库添加到项目属性-> Input->附加依赖项中或使其成为一部分项目的

-使用项目属性-> VC ++目录执行相同的操作,然后将库添加到项目属性->输入->其他依赖项,或使其成为项目的一部分

-使用项目属性-> C ++->一般->附加包含目录来指定.h的位置,使用项目属性->输入->附加依赖关系来指定库的路径或使其成为库的一部分.项目.然后,您必须手动将DLL复制到您的release/debug目录中,然后才能运行它

另一个选择是下载源代码并将项目添加到您的解决方案中.如果这样做,则必须告诉编译器包含文件的位置,但不必弄乱库路径.

到目前为止,这已经足够了,而无需知道该项目的用途,因此很难推荐配置.
Stick the .h, .lib and .dll (if there is one) somewhere. I''d suggest somewhere parallel to where your code is so you find the files with a relative path

EITHER

- Extend the environment for path (for finding the DLL), LIB and INCLUDE to include the path to where you''ve dumped the files, then add the library to project properties->Input->additional dependencies or make it part of the project

- Use project properties->VC++ Directories to do the same thing, then add the library to project properties->Input->additional dependencies or make it part of the project

- Use project properties->C++->general->Additional Include Directories to specify where the .h is, project properties->Input->additional dependencies to specify the path to the library or make it part of the projects. Then you''ll have to manually copy the DLL to your release/debug directory to be able to run it

Another option is to download the source and add a project to your solution. If you do that you''ll have to tell the compiler where the includes are but not have to fiddle around with the library path.

That''s enough options for now, without knowing what the project''s for it''s hard to recommend a configuration.


很容易-用Google搜索这个问题.

http://visualambition.wordpress.com/2010/08/12/glut -and-visual-studio-2010/ [
Its easy - Google the question.

http://visualambition.wordpress.com/2010/08/12/glut-and-visual-studio-2010/[^]


这篇关于如何在Visaul Studio中安装新图书馆?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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