Frequently Asked Questions

Can I contribute a new library?

Yes! Start out by reading our contribution guidelines.

Can Vcpkg create pre-built binary packages? What is the binary format used by Vcpkg?

Yes! See the export command.

How do I update libraries?

The vcpkg update command lists all packages which are out-of-sync with your current portfiles. To update a package, follow the instructions in the command.

How do I get more libraries?

The list of libraries is enumerated from the ports\ directory. By design, you can add and remove libraries from this directory as you see fit for yourself or your company – see Example #2.

We recommend cloning directly from GitHub and using git pull to update the list of portfiles. Once you’ve updated your portfiles, vcpkg update will indicate any installed libraries that are now out of date.

Can I build a private library with this tool?

Yes. Follow our Packaging zlib Example for creating a portfile using a fake URL. Then, either pre-seed the downloads\ folder with a zip containing your private sources or replace the normal calls to vcpkg_download_distfile and vcpkg_extract_source_archive with functions that unpack your source code.

Can I use a prebuilt private library with this tool?

Yes. The portfile.cmake for a library is fundamentally a script that places the headers and binaries into the correct arrangement in the ${CURRENT_PACKAGES_DIR}, so to pull in prebuilt binaries you can write a portfile which directly downloads and arranges the files.

To see an example of this, look at ports\opengl\portfile.cmake which simply copies files out of the Windows SDK.

Which platforms I can target with Vcpkg?

We currently target Windows Desktop (x86 and x64) as well as the Universal Windows Platform (x86, x64, and ARM). See vcpkg help triplet for the current list.

Does Vcpkg run on Linux/OSX?

No, for this preview we are focusing on Windows as a host platform. If you’d be interested in having Vcpkg run on Linux or OSX, please let us know in this issue!

How do I use different versions of a library on one machine?

Within a single instance of Vcpkg (e.g. one set of installed\, packages\, ports\ and so forth), you can only have one version of a library installed (otherwise, the headers would conflict with each other!). For those with experience with system-wide package managers, packages in Vcpkg correspond to the X-dev or X-devel packages.

To use different versions of a library for different projects, we recommend making separate instances of Vcpkg and using the per-project integration mechanisms. The versions of each library are specified by the files in ports\, so they are easily manipulated using standard git commands. This makes it very easy to roll back the entire set of libraries to a consistent set of older versions which all work with each other. If you need to then pin a specific library forward, that is as easy as checking out the appropriate version of ports\<package>\.

If your application is very sensitive to the versions of libraries, we recommend checking in the specific set of portfiles you need into your source control along with your project sources and using the --vcpkg-root option to redirect the working directory of vcpkg.exe.

How does Vcpkg protect my Privacy?

See the Privacy document for all information regarding privacy.

Can I use my own CMake toolchain file with Vcpkg’s toolchain file?

Yes. If you already have a CMake toolchain file, you will need to include our toolchain file at the end of yours. This should be as simple as an include(<vcpkg_root>\scripts\buildsystems\vcpkg.cmake) directive. Alternatively, you could copy the contents of our scripts\buildsystems\vcpkg.cmake into the end of your existing toolchain file.

Can I use my own/specific flags for rebuilding libs?

Yes. In the current preview, there is not yet a standardized global way to change them, however you can edit individual portfiles and tweak the exact build process however you’d like.

By saving the changes to the portfile (and checking them in), you’ll get the same results even if you’re rebuilding from scratch in the future and forgot what exact settings you used.

How is CMake used internally by Vcpkg?

Vcpkg uses CMake internally as a build scripting language. This is because CMake is already an extremely common build system for cross-platform open source libraries and is becoming very popular for C++ projects in general. It is easy to acquire on Windows, does not require system-wide installation, and legible for unfamiliar users.

Will Vcpkg support downloading compiled binaries from a public or private server?

We would like to eventually support downloading precompiled binaries, similar to other system package managers.

In a corporate scenario, we currently recommend building the libraries once and distributing the entire vcpkg root directory to everyone else on the project through some raw file transport such as a network share or HTTP host. See the export command.

What Visual C++ toolsets are supported?

We support Visual Studio 2015 Update 3 and above.

Why does Visual Studio not use my libraries with user-wide integration enabled?

Enabling user-wide integration (vcpkg integrate install) changes the default for some project properties. In particular, “C/C++/General/Additional Include Directories” and “Linker/General/Additional Library Directories” are normally blank without user-wide integration. With integration, a blank value means that the augmented default supplied by vcpkg is overridden, and headers/libraries will not be found. To reinstate the default, set the properties to inherit from parent.

Why not NuGet?

NuGet is a package manager for .NET libraries with a strong dependency on MSBuild. It does not meet the specific needs of Native C++ customers in at least three ways.

Why not Conan?

Conan.io is a publicly-federated, project-centric, cross-platform, C++ package manager written in python. Our primary differences are:

Why not Chocolatey?

Chocolatey is an excellent system for managing applications. However, it is not currently designed to acquire redistributable developer assets and help you with debugging. Vcpkg, in comparison, is designed to get you the libraries you need to build your application and help you deliver through any platform you’d like (including Chocolatey!).