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 對應的頭文件便可使用。工具

相關文章
相關標籤/搜索