vcpkg安装

vcpkg安装

概述

​ vcpkg能够帮组你获取Windows平台的C和C++库。这个工具和ecosystem正处于预览阶段。您的参与对vcpkg的成功是很是的重要。 运行vcpkghelp能够获取可用命令的简短描述:git

Commands:
  vcpkg search [pat]              Search for packages available to be built
  vcpkg install <pkg>...          Install a package
  vcpkg remove <pkg>...           Uninstall a package
  vcpkg remove --outdated         Uninstall all out-of-date packages
  vcpkg list                      List installed packages
  vcpkg update                    Display list of packages for updating
  vcpkg upgrade                   Rebuild all outdated packages
  vcpkg hash <file> [alg]         Hash a file by specific algorithm, default SHA512
  vcpkg help topics               Display the list of help topics
  vcpkg help <topic>              Display help for a specific topic

  vcpkg integrate install         Make installed packages available user-wide. Requires admin privileges on first use
  vcpkg integrate remove          Remove user-wide integration
  vcpkg integrate project         Generate a referencing nuget package for individual VS project use
  vcpkg integrate powershell      Enable PowerShell Tab-Completion

  vcpkg export <pkg>... [opt]...  Exports a package
  vcpkg edit <pkg>                Open up a port for editing (uses %EDITOR%, default 'code')
  vcpkg import <pkg>              Import a pre-built library
  vcpkg create <pkg> <url>
             [archivename]        Create a new package
  vcpkg owns <pat>                Search for files in installed packages
  vcpkg env                       Creates a clean shell environment for development or compiling.
  vcpkg version                   Display version information
  vcpkg contact                   Display contact information to send feedback

Options:
  --triplet <t>                   Specify the target architecture triplet.
                                  (default: %VCPKG_DEFAULT_TRIPLET%, see 'vcpkg help triplet')

  --vcpkg-root <path>             Specify the vcpkg root directory
                                  (default: %VCPKG_ROOT%)

For more help (including examples) see the accompanying README.md.

快速教程

  1. 安装要求:github

    • Visual Studio 2015 Update 3 or
    • Visual Studio 2017
    • CMake 3.8.0 或更高 (备注: 若是你机器上没有找到,将会自动安装到你的机器上)
    • git.exe 加入到path中
  2. 克隆vcpkg库sql

    git clone https://github.com/Microsoft/vcpkg.git
  3. 设定user-wide整合(初次执行须要管理员权限)shell

    vcpkg.exe integrate install
  4. 安装库ide

    vcpkg.exe install sqlite3 boost
  5. 最后,在Visual Studio 2015中新建工程,只须要 #include 对应的头文件便可使用。工具

相关文章
相关标签/搜索