Training
Module
Explore modules, packages, and third-party crates - Training
Learn about how to effectively use modules and how to integrate with packages and third-party crates.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
When installing libraries, vcpkg creates a single common layout partitioned by triplet.
The root of the tree in Classic mode is
<vcpkg root>/installed
. The root of the tree in Manifest
mode is <vcpkg.json directory>/vcpkg_installed
.
Underneath this root, in a subfolder named after the triplet:
include/
.lib
, .a
, and .so
files: lib/
or lib/manual-link/
.dll
files: bin/
.pc
files: lib/pkgconfig/
or share/pkgconfig/
.lib
, .a
, and .so
files: debug/lib/
or debug/lib/manual-link/
.dll
files: debug/bin/
.pc
files: debug/lib/pkgconfig/
or debug/share/pkgconfig/
tools/<port>/
For example, zlib.h
for zlib:x64-windows
in classic mode is located at <vcpkg root>/installed/x64-windows/include/zlib.h
.
See your build system specific documentation for how to use prebuilt binaries. For example, Makefile projects often accept environment variables:
export CXXFLAGS=-I$(pwd)/installed/x64-linux/include
export CFLAGS=-I$(pwd)/installed/x64-linux/include
export LDFLAGS=-L$(pwd)/installed/x64-linux/lib
export PKG_CONFIG_PATH=$(pwd)/installed/x64-linux/lib/pkgconfig:$(pwd)/installed/x64-linux/share/pkgconfig:$PKG_CONFIG_PATH
On Windows dynamic triplets (such as x64-windows) you will also need to either copy the needed DLL files to the same folder as your executable or prepend the correct bin\
directory to your path to run any produced executables.
vcpkg feedback
vcpkg is an open source project. Select a link to provide feedback:
Training
Module
Explore modules, packages, and third-party crates - Training
Learn about how to effectively use modules and how to integrate with packages and third-party crates.