opensourceprojects.dev

A broadsheet for software that doesn't ask for your email

vcpkg: a C/C++ package manager for CMake, MSBuild, and everything in between
GitHub RepoImpressions3

Project Description

View on GitHub

vcpkg: Finally, a Package Manager That Understands C++

If you've ever spent an afternoon wrestling with dependency hell in a C++ project, you know the pain. Hunting down the right version of a library, configuring include paths, linking against the correct binaries—it's enough to make you question your career choices. vcpkg is Microsoft's answer to this problem, and it's been quietly gaining traction since 2016.

What It Does

vcpkg is a free, open-source C/C++ package manager maintained by Microsoft and the C++ community. It started as a tool to help developers migrate projects to newer versions of Visual Studio, but it's since evolved into a cross-platform solution that works on Windows, macOS, and Linux.

The tool itself is written in C++ with CMake scripts, which makes sense—it's built by people who understand the unique headaches of C++ development. It integrates with CMake, MSBuild, and pretty much any other build system you might be using. You can work with it from Visual Studio, VS Code, CLion, Qt Creator, or just the command line. The project maintains a large collection of open-source libraries, and if something you need isn't there, you can contribute it yourself or open an issue.

Why It's Cool

Here's what makes vcpkg worth your attention:

  • It actually gets C++. Most package managers were designed with other languages in mind and treat C++ as an afterthought. vcpkg was built from the ground up to address the specific pain points C/C++ developers face—things like ABI compatibility, header-only libraries, and the nightmare of transitive dependencies.

  • Manifest mode changes how you think about dependencies. Instead of installing packages globally and hoping everything plays nice, you can create a manifest for your project's dependencies. Two commands and you're set: vcpkg new --application followed by vcpkg add port fmt. Your dependencies are now declared in your project, versioned, and reproducible.

  • Version control that doesn't make you cry. You can control the versions of your dependencies explicitly. No more "it works on my machine" because someone installed a different version of OpenSSL three years ago.

  • Binary caching saves your sanity. If you're tired of rebuilding the same dependencies every time you switch branches or clean your build directory, binary caching lets you reuse compiled artifacts. This alone can save hours on larger projects.

  • Offline scenarios are handled. Asset caching means you can work without an internet connection once you've got what you need. Useful for CI environments, air-gapped systems, or when your WiFi decides to take a vacation.

  • You can publish your own packages. If you've got internal libraries or want to share something with the community, vcpkg supports creating and publishing packages through registries.

  • Build system agnostic. Whether you're team CMake, team MSBuild, or you've got some custom setup, vcpkg doesn't force you to change how you work. It meets you where you are.

How to Try It

Getting started is straightforward. First, pick your quick start guide based on your build system:

Once installed, you've got two main ways to use it. For manifest mode (which I'd recommend for new projects):

vcpkg new --application
vcpkg add port fmt

Or if you prefer the classic approach of installing packages directly:

vcpkg install fmt

Then integrate with your build system using the available CMake, MSBuild, or manual integrations. Run vcpkg help to see all available commands, or vcpkg help [topic] for details on something specific.

One nice quality-of-life addition: you can add tab completion to your terminal after you've got things working.

The repository is at github.com/microsoft/vcpkg, and if a library you need isn't in the registry, you can open an issue or contribute the package yourself.

Final Thoughts

vcpkg isn't trying to be everything to everyone—it's specifically designed for C++ developers who are tired of dependency management being a manual, error-prone process. If you're working on C++ projects of any significant size, especially ones with multiple dependencies, it's worth your time to check it out. The learning curve is reasonable, and the payoff (reproducible builds, version control, binary caching) is substantial.

The project is actively maintained and constantly evolving, with contributions from both Microsoft and the broader C++ community. Whether you're migrating a legacy codebase or starting something new, vcpkg offers a practical path forward. Give it a try on your next project—your future self will thank you when you're not debugging linker errors at 2 AM.


Follow @githubprojects for more developer tools and open source projects.

Back to Projects
Project ID: 2a97c0e9-f2c9-4aa3-8820-8c2648f15aebLast updated: September 25, 2026 at 02:56 AM