Skip to content

Commit a9595a2

Browse files
authored
Merge pull request MicrosoftDocs#820 from MicrosoftDocs/mb-vcpkg3
fixes per tech review
2 parents 864157b + f33d57c commit a9595a2

File tree

1 file changed

+11
-40
lines changed

1 file changed

+11
-40
lines changed

docs/vcpkg.md

Lines changed: 11 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ With a single command, you can download sources and build a library. vcpkg is it
2222

2323
## Sources not binaries
2424

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.
2626

2727
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.
2828

@@ -33,10 +33,9 @@ If you create a vcpkg clone with private libraries in the ports collection, you
3333
Clone the vcpkg repo from GitHub: https://github.com/Microsoft/vcpkg. You can download to any folder location you prefer.
3434

3535
Run the bootstrapper in the root folder:
36-
- **bootstrap-vcpkg.bat** (Windows)
37-
- ./bootstrap-vcpkg.sh (Linux, MacOS)
3836

39-
## Basic tasks
37+
- **bootstrap-vcpkg.bat** (Windows)
38+
- **./bootstrap-vcpkg.sh** (Linux, MacOS)
4039

4140
## Search the list of available libraries
4241

@@ -124,46 +123,18 @@ If you need to use a specific version of a library that is different from the ve
124123
1. Run **vcpkg install \<library>**.
125124
1. Use **vcpkg integrate project** to create a NuGet package that references that library on a per-project basis.
126125

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+
127130
## Target Linux from Windows via WSL
128131

129132
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.
130133

131134

132135
## <a name="export_binaries_per_project"></a> Export compiled binaries and headers
133136

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.
167138

168139
## Update/upgrade installed libraries
169140

@@ -217,7 +188,7 @@ Just delete the directory.
217188

218189
## Send feedback about vcpkg
219190

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.
221192

222193
## The vcpkg folder hierarchy
223194

@@ -253,14 +224,14 @@ The contents of a vcpkg instance are:
253224
|**vcpkg export \<pkg>... [opt]...**|Export a package|
254225
|**vcpkg edit \<pkg>**|Open up a port for editing (uses %EDITOR%, default 'code')|
255226
|**vcpkg create \<pkg> \<url> [archivename]**|Create a new package|
256-
|**vcpkg owns \<pat>**|Search for files in installed packages|
257227
|**vcpkg cache**|List cached compiled packages|
258228
|**vcpkg version**|Display version information|
259-
|**vcpkg contact**|Display contact information to send feedback|
229+
|**vcpkg contact --survey**|Display contact information to send feedback.|
260230

261231
### Options
262232

263233
|Option|Description|
264234
|---------|---------|
265235
|**--triplet \<t>**|Specify the target architecture triplet. (default: `%VCPKG_DEFAULT_TRIPLET%`, see also **vcpkg help triplet**)|
266236
|**--vcpkg-root \<path>**|Specify the vcpkg root directory (default: `%VCPKG_ROOT%`)|
237+

0 commit comments

Comments
 (0)