vcpkg安装

vcpkg安装

概述

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

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. 安装要求:

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

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

    vcpkg.exe integrate install
    
  4. 安装库

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

转载于:https://my.oschina.net/u/183476/blog/1923853

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值