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
+11-40Lines changed: 11 additions & 40 deletions
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ With a single command, you can download sources and build a library. vcpkg is it
22
22
23
23
## Sources not binaries
24
24
25
-
For libraries in the Windows catalog, vcpkg downloads sources instead of binaries[1]. It compiles those sources using Visual Studio 2017, or Visual Studio 2015 if 2017 is not installed. In C++, it is very important that any libraries you use are complied with the same compiler, and compiler version, as the application code that links to it. By using vcpkg, you eliminate or at least greatly reduce the potential for mismatched binaries and the problems they can cause. In teams that are standardized on a specific version of the Visual C++ compiler, one team member can use vcpkg to download sources and compile a set of binaries and then use the export command to zip up the binaries and headers for other team members. For more information, see [Export compiled binaries and headers](#export_binaries_per_project) below.
25
+
For libraries in the Windows catalog, vcpkg downloads sources instead of binaries[1]. It compiles those sources using Visual Studio 2017, or Visual Studio 2015 if 2017 is not installed. In C++, it is very important that any libraries you use are complied with the same compiler, and compiler version, as the application code that links to it. By using vcpkg, you eliminate or at least greatly reduce the potential for mismatched binaries and the problems they can cause. In teams that are standardized on a specific version of a compiler, one team member can use vcpkg to download sources and compile a set of binaries and then use the export command to zip up the binaries and headers for other team members. For more information, see [Export compiled binaries and headers](#export_binaries_per_project) below.
26
26
27
27
If you create a vcpkg clone with private libraries in the ports collection, you can add a port that downloads prebuilt binaries and headers and write a portfile.cmake file that simply copies those files to the desired location.
28
28
@@ -33,10 +33,9 @@ If you create a vcpkg clone with private libraries in the ports collection, you
33
33
Clone the vcpkg repo from GitHub: https://github.com/Microsoft/vcpkg. You can download to any folder location you prefer.
34
34
35
35
Run the bootstrapper in the root folder:
36
-
-**bootstrap-vcpkg.bat** (Windows)
37
-
- ./bootstrap-vcpkg.sh (Linux, MacOS)
38
36
39
-
## Basic tasks
37
+
-**bootstrap-vcpkg.bat** (Windows)
38
+
-**./bootstrap-vcpkg.sh** (Linux, MacOS)
40
39
41
40
## Search the list of available libraries
42
41
@@ -124,46 +123,18 @@ If you need to use a specific version of a library that is different from the ve
124
123
1. Run **vcpkg install \<library>**.
125
124
1. Use **vcpkg integrate project** to create a NuGet package that references that library on a per-project basis.
126
125
126
+
## Integrate with Visual Studio Code (Linux/MacOS)
127
+
128
+
Run **vcpkg integrate install** to configure Visual Studio Code on Linux/MacOS with the location of the vcpkg enlistement and enable IntelliSense on source files.
129
+
127
130
## Target Linux from Windows via WSL
128
131
129
132
You can produce Linux binaries from a Windows machine by using the Windows Subsystem for Linux (WSL). Follow the instructions to [Set up WSL on Windows 10](https://docs.microsoft.com/en-us/windows/wsl/install-win10), and configure it with the [Visual Studio extension for Linux](https://blogs.msdn.microsoft.com/vcblog/2017/02/08/targeting-windows-subsystem-for-linux-from-visual-studio/). You can put all your built libraries for both Windows and Linux into the same folder and access it from both Windows and WSL.
130
133
131
134
132
135
## <aname="export_binaries_per_project"></a> Export compiled binaries and headers
133
136
134
-
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.
135
-
136
-
## Update/upgrade installed libraries
137
-
138
-
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.
139
-
140
-
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.
141
-
142
-
```cmd
143
-
vcpkg upgrade --no-dry-run
144
-
```
145
-
146
-
### Upgrade Options
147
-
148
-
-**--no-dry-run** Perform the upgrade; when not specified, the command only lists the out-of-date packages.
149
-
-**--keep-going** Continue installing packages even if one fails.
150
-
-**--triplet \<t>** Set the default triplet for unqualified packages.
151
-
-**--vcpkg-root \<path>** Specify the vcpkg directory to use instead of current directory or tool directory.
152
-
153
-
### Upgrade example
154
-
155
-
### Per project
156
-
157
-
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:
158
-
159
-
1. Make a new clone of vcpkg
160
-
1. Modify the portfile for the library to obtain the version you need
161
-
1. Run **vcpkg install \<library>**.
162
-
1. Use **vcpkg integrate project** to create a NuGet package that references that library on a per-project basis.
163
-
164
-
## Export compiled binaries and headers
165
-
166
-
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.
137
+
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, or a NuGet package (various format available), that can be easily shared with other team members.
167
138
168
139
## Update/upgrade installed libraries
169
140
@@ -217,7 +188,7 @@ Just delete the directory.
217
188
218
189
## Send feedback about vcpkg
219
190
220
-
Use the **--survey** command to send feedback to Microsoft about vcpkg, including bug reports and suggestions for features.
191
+
Use the **vcpkg contact --survey** command to send feedback to Microsoft about vcpkg, including bug reports and suggestions for features.
221
192
222
193
## The vcpkg folder hierarchy
223
194
@@ -253,14 +224,14 @@ The contents of a vcpkg instance are:
253
224
|**vcpkg export \<pkg>... [opt]...**|Export a package|
254
225
|**vcpkg edit \<pkg>**|Open up a port for editing (uses %EDITOR%, default 'code')|
255
226
|**vcpkg create \<pkg> \<url> [archivename]**|Create a new package|
256
-
|**vcpkg owns \<pat>**|Search for files in installed packages|
257
227
|**vcpkg cache**|List cached compiled packages|
258
228
|**vcpkg version**|Display version information|
259
-
|**vcpkg contact**|Display contact information to send feedback|
229
+
|**vcpkg contact --survey**|Display contact information to send feedback.|
260
230
261
231
### Options
262
232
263
233
|Option|Description|
264
234
|---------|---------|
265
235
|**--triplet \<t>**|Specify the target architecture triplet. (default: `%VCPKG_DEFAULT_TRIPLET%`, see also **vcpkg help triplet**)|
266
236
|**--vcpkg-root \<path>**|Specify the vcpkg root directory (default: `%VCPKG_ROOT%`)|
0 commit comments