vcpkg README

The project's README from github.com/microsoft/vcpkg. As one markdown file: README.md.

🌐 Read in a different language

vcpkg overview

vcpkg is a free and open-source C/C++ package manager maintained by Microsoft and the C++ community.

Initially launched in 2016 as a tool for assisting developers in migrating their projects to newer versions of Visual Studio, vcpkg has evolved into a cross-platform tool used by developers on Windows, macOS, and Linux. vcpkg has a large collection of open-source libraries and enterprise-ready features designed to facilitate your development process with support for any build and project systems. vcpkg is a C++ tool at heart and is written in C++ with scripts in CMake. It is designed from the ground up to address the unique pain points C/C++ developers experience.

This tool and ecosystem are constantly evolving, and we always appreciate contributions! Learn how to start contributing with our packaging tutorial and maintainer guide.

Get started

First, follow one of our quick start guides.

Whether you're using CMake, MSBuild, or any other build system, vcpkg has you covered:

You can also use any editor:

If a library you need is not present in the vcpkg registry, open an issue on the GitHub repository or contribute the package yourself.

After you've gotten vcpkg installed and working, you may wish to add tab completion to your terminal.

Use vcpkg

Create a manifest for your project's dependencies:

vcpkg new --application
vcpkg add port fmt

Or install packages through the command line:

vcpkg install fmt

Then use one of our available integrations for CMake, MSBuild or other build systems.

For a short description of all available commands, run vcpkg help. Run vcpkg help [topic] for details on a specific topic.

Key features

vcpkg offers powerful features for your package management needs:

Contribute

vcpkg is an open source project, and is thus built with your contributions. Here are some ways you can contribute:

Please refer to our maintainer guide and packaging tutorial for more details.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or email [email protected] with any additional questions or comments.

Resources

License

The code in this repository is licensed under the MIT License. The libraries provided by ports are licensed under the terms of their original authors. Where available, vcpkg places the associated license(s) in the location installed/<triplet>/share/<port>/copyright.

Security

Most ports in vcpkg build the libraries in question using the original build system preferred by the original developers of those libraries, and download source code and build tools from their official distribution locations. For use behind a firewall, the specific access needed will depend on which ports are being installed. If you must install it in an "air gapped" environment, consider installing once in a non-"air gapped" environment, populating an asset cache shared with the otherwise "air gapped" environment.

Telemetry

vcpkg collects usage data in order to help us improve your experience. The data collected by Microsoft is anonymous. You can opt-out of telemetry by:

Read more about vcpkg telemetry at https://learn.microsoft.com/vcpkg/about/privacy.

vcpkg (microsoft/vcpkg)

Searching Database…

27.5K ·GitHub
这是什么?vcpkg 是一个免费、开源的 C/C++ 包管理器,由微软和 C++ 社区共同维护,可以帮你获取、构建和管理 C++ 项目所用的第三方库。
它是一个构建系统,还是能接入我已经在用的那个?它本身不是构建系统。vcpkg 可以与你已在使用的构建系统集成,例如 CMake、MSBuild 等,具体方法见对应的集成指南。
我该如何用 vcpkg 安装包?创建一个列出项目依赖的清单文件,或者直接在命令行中安装单个包,然后配置 CMake/MSBuild 集成。
使用它是否需要特定的编辑器或 IDE?不需要。vcpkg 可以配合任何编辑器使用;官方提供了 Visual Studio、VS Code、CLion 和 Qt Creator 的专门设置指南,但都不是必需的。
我能在隔离网络环境中使用 vcpkg 吗?可以,但初次使用时需要联网下载源代码。对于隔离网络环境,需要先在联网环境中填充资源缓存,再将其共享给离线环境使用。
vcpkg 在 Windows、macOS 和 Linux 上的表现是否一致?是的。vcpkg 最初是一个用于 Windows/Visual Studio 迁移的工具,现在已发展为完全跨平台的工具,Windows、macOS 和 Linux 上的开发者都在使用。
vcpkg 会向微软发送任何使用数据吗?会。vcpkg 默认收集匿名遥测数据,但你可以通过引导脚本参数、命令行参数或环境变量选择退出。
如果我需要的库不在 vcpkg 注册表中,会怎样?你可以在 GitHub 仓库中提交问题反馈,请求添加该库;也可以利用官方提供的打包教程和维护者指南,自己打包并贡献到仓库中。
我能否控制所安装依赖的具体版本?可以。依赖版本控制是 vcpkg 的主要功能之一,与二进制产物复用和构建系统集成并列。
vcpkg 允许我发布自己的包吗?允许。除了使用现有注册表之外,它的一项主要功能就是帮你打包并发布自己的库。
What are similar projects?xmake, composer, ninja, nub, Nuitka, spinel, poetry, cargo
Creator
microsoft
Size
114 MB
Stars
27.5K
Age
10y
Commits · 90 Days