将库添加到 Visual Studio 2010 express [英] adding a library to visual studio 2010 express

查看:43
本文介绍了将库添加到 Visual Studio 2010 express的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

似乎无法找到有关如何添加库的明确答案.有很多地方可以添加文件路径的项目属性,但我想知道我是否不应该编辑所有这些,有人可以告诉我每个可能条目的目的,如果有更多,可能我应该编辑哪些?或方便的教程?生病列出我所知道的条目.目前正在尝试添加 Wwise 库.

cant seem to find a definintive answer to how to add a library. theres project properties with a whole bunch of places to add filepaths but im wondering if i shouldnt be editing all of them, can someone tell me the purpose of each possible entry, if there are more, and possibly which ones i should be editing? or a handy tutoril? ill list what entries i know about. currently trying to add the Wwise library.

项目->项目名称属性->配置属性->vc++目录->库目录(单击编辑并添加相关文件路径)

project->project name properties->configuration properties->vc++ directories->library directories (click edit and addthe relevant filepath)

  • 项目->项目名称属性->配置属性->链接器->常规->附加库依赖项(点击编辑并添加相关文件路径)

    project->project name properties->configuration properties->linker->general->additional library dependencies (click edit and addthe relevant filepath)

  • 项目->项目名称属性->配置属性->链接器->输入->附加依赖项(输入名称库的手动)

    project->project name properties->configuration properties->linker->input->additional dependencies (enter the names of the libraries manually)

  • 如果我经历了所有这些,我会遇到比开始时更多的链接器错误

    If i go through all that i get more linker errors than i started with

    推荐答案

    1. 这些是链接器将搜索随 Visual Studio 提供的 .lib 的目录.像 CRT、MFC、ATL 和 Windows SDK.您不想修改那个,默认值是从注册表中读取并由安装程序写入那里的.仅当您想链接到这些 .libs 的非标准版本时才进行更改

    1. Those are the directories that the linker will search for .libs that are provided with Visual Studio. Like the CRT, MFC, ATL and the Windows SDK. You don't want to tinker with that one, the default value is read from the registry and was written there by the installer. Only change if you want to link to non-standard versions of these .libs

    那些是链接器实际链接的文件.

    Those are the files that the linker will actually link.

    这些是额外的目录,链接器将在这些目录中搜索第 2 条中指定的文件或源代码中的 #pragma 注释指令.如果第 2 项未指定文件的完整路径或 .lib 文件不在 VS 标准目录或项目目录之一中,则您只需要设置此项.例如,您通常将 Boost 安装目录放在那里.

    Those are the additional directories that the linker will search for files that were specified in bullet 2 or from #pragma comment directives in the source code. You'll only need to set this if bullet 2 didn't specify the full path of the file or the .lib file isn't present in one of the VS standard directories or the project directory. You typically put the Boost install directory there for example.

    所以第 2 项是重要的一项,它实际上指定了将要链接的内容.Bullet 3 只是帮助链接器找到文件.

    So bullet 2 is the important one, that actually specifies what will be linked. Bullet 3 just helps the linker find the file.

    这篇关于将库添加到 Visual Studio 2010 express的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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