You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/vcpkg.md
+33-12Lines changed: 33 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ description: vcpkg is a command line package manager that greatly simplifies the
4
4
keywords: vcpkg
5
5
author: mikeblome
6
6
ms.author: mblome
7
-
ms.date: 02/01/2018
7
+
ms.date: 04/06/2018
8
8
ms.technology: ["cpp-ide"]
9
9
ms.tgt_pltfrm: "windows"
10
10
ms.assetid: f50d459a-e18f-4b4e-814b-913e444cedd6
@@ -45,7 +45,7 @@ This command enumerates the control files in the vcpkg/ports subfolders. You wil
45
45
46
46
```cmd
47
47
ace 6.4.3 The ADAPTIVE Communication Environment
48
-
anax 2.1.0-1 An open source C++ entity system. <https://github...
48
+
anax 2.1.0-1 An open source C++ entity system. \<https://github...
49
49
antlr4 4.6-1 ANother Tool for Language Recognition
50
50
apr 1.5.2 The Apache Portable Runtime (APR) is a C library ...
51
51
asio 1.10.8 Asio is a cross-platform C++ library for network ...
@@ -78,7 +78,6 @@ Additional packages (*) will be installed to complete this operation.
78
78
```
79
79
80
80
## List the libraries already installed
81
-
82
81
After you have installed some libraries, you can use **vcpkg list** to see what you have:
83
82
84
83
```cmd
@@ -98,9 +97,7 @@ zlib:x86-windows 1.2.11 A compression library
98
97
99
98
Run **vcpkg integrate install** to configure Visual Studio to locate all vcpkg header files and binaries on a per-user basis without the need for manual editing of VC++ Directories paths. If you have multiple clones, the clone from which you run this command becomes the new default location.
100
99
101
-
Now you can #include headers simply by typing the folder/header, and auto-complete assists you. No additional steps are required for linking to libs or adding project references. The following illustration shows how Visual Studio finds the azure-storage-cpp headers. vcpkg places its headers in the \installed subfolder, partitioned by target platform. The following diagram shows the list of include files in the `/was` subfolder for the library:
102
-
103
-
Now you can #include headers simply by typing the folder/header, and auto-complete will help you. No additional steps are required for linking to libs or adding project references. The following illustration shows how Visual Studio finds the azure-storage-cpp headers. vcpkg places its headers in the \installed subfolder, partitioned by target platform. The following diagram shows the list of include files in the \was subfolder for the library:
100
+
Now you can #include headers simply by typing the folder/header, and auto-complete assists you. No additional steps are required for linking to libs or adding project references. The following illustration shows how Visual Studio finds the azure-storage-cpp headers. vcpkg places its headers in the **/installed** subfolder, partitioned by target platform. The following diagram shows the list of include files in the **/was** subfolder for the library:
104
101
105
102

106
103
@@ -136,6 +133,36 @@ By default, the **upgrade** command only lists the libraries that are out of dat
136
133
137
134
### Upgrade example
138
135
136
+
### Per project
137
+
If you need to use a specific version of a library that is different from the version in your active vcpkg instance, follow these steps:
138
+
139
+
1. Make a new clone of vcpkg
140
+
1. Modify the portfile for the library to obtain the version you need
141
+
1. Run **vcpkg install \<library>**.
142
+
1. Use **vcpkg integrate project** to create a NuGet package that references that library on a per-project basis.
143
+
144
+
145
+
## Export compiled binaries and headers
146
+
Requiring everyone on a team to download and build libraries can be inefficient. A single team member can do that work, and then use **vcpkg export** to create a zip file of the binaries and headers that can be easily shared with other team members.
147
+
148
+
## Update/upgrade installed libraries
149
+
The public catalog is kept up-to-date with the latest versions of the libraries. To determine which of your local libraries are out-of-date, use **vcpkg update**. When you're ready to update your ports collection to the latest version of the public catalog, run the **vcpkg upgrade** command to automatically download and rebuild any or all of your installed libraries that are out of date.
150
+
151
+
By default, the **upgrade** command only lists the libraries that are out of date; it doesn’t upgrade them. To perform the upgrade, use the **--no-dry-run** option.
152
+
153
+
```cmd
154
+
vcpkg upgrade --no-dry-run
155
+
```
156
+
157
+
### Upgrade Options
158
+
159
+
-**--no-dry-run** Perform the upgrade; when not specified, the command only lists the out-of-date packages.
160
+
-**--keep-going** Continue installing packages even if one fails.
161
+
-**--triplet \<t>** Set the default triplet for unqualified packages.
162
+
-**--vcpkg-root \<path>** Specify the vcpkg directory to use instead of current directory or tool directory.
163
+
164
+
### Upgrade example
165
+
139
166
The following example shows how to upgrade only specified libraries. Note that vcpgk automatically pulls in dependencies as necessary.
140
167
141
168
```cmd
@@ -152,27 +179,21 @@ If you are sure you want to rebuild the above packages, run this command with th
152
179
```
153
180
154
181
## Contribute new libraries
155
-
156
182
You can include any libraries you like in your private ports collection. To suggest a new library for the public catalog, open an issue on the [GitHub vcpkg issue page](https://github.com/Microsoft/vcpkg/issues).
157
183
158
184
## Remove a library
159
-
160
185
Type **vcpkg remove** to remove an installed library. If any other libraries depend on it, you are asked to rerun the command with **--recurse**, which causes all downstream libraries to be removed.
161
186
162
187
## Customize vcpkg
163
-
164
188
You can modify your clone of vcpkg in any way you like. You can create multiple vcpkg clones and modify the portfiles in each one to obtain specific versions of libraries or specify command-line parameters. For example, in an enterprise, one group of developers might be working on software that has one set of dependencies, and another group might have a different set. You can set up two clones of vcpkg, and modify each one to download the versions of the libraries and the compilation switches, etc, according to your needs.
165
189
166
190
## Uninstall vcpkg
167
-
168
191
Just delete the directory.
169
192
170
193
## Send feedback about vcpkg
171
-
172
194
Use the **--survey** command to send feedback to Microsoft about vcpkg, including bug reports and suggestions for features.
173
195
174
196
## The vcpkg folder hierarchy
175
-
176
197
All vcpkg functionality and data is self-contained in a single directory hierarchy, called an "instance". There are no registry settings or environment variables. You can have any number of instances of vcpkg on a machine and they do not interfere with each other.
0 commit comments