Skip to content

Commit 862f0be

Browse files
TylerMSFTTylerMSFT
authored andcommitted
tie in vcpkg docs
1 parent e361f51 commit 862f0be

18 files changed

Lines changed: 40 additions & 34 deletions

docs/build/adding-references-in-visual-cpp-projects.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,18 @@ title: "Consuming libraries and components in C++ projects"
44
ms.date: 12/18/2020
55
f1_keywords: ["VC.Project.References"]
66
helpviewer_keywords: ["Add References Dialog Box (C++)", ".NET Framework (C++), Add References Dialog Box"]
7-
ms.assetid: 12b8f571-0f21-40b3-9404-5318a57e9cb5
87
---
98
# Consuming libraries and components
109

1110
C++ projects often need to call functions or access data in a binary file such as static library (LIB files), DLL, Windows Runtime component, COM component, or .NET assembly. In these cases, you have to configure the project so that it can find that binary at build time. The specific steps depend on the type of your project, the type of the binary, and whether the binary gets built in the same solution as your project.
1211

1312
## Consuming libraries downloaded via vcpkg
1413

15-
To consume a library that you have downloaded by using the **vcpkg** package manager, you can ignore the instructions below. For more information, see [vcpkg.io](https://vcpkg.io/).
14+
To consume a library that you have downloaded by using the **vcpkg** package manager, you can ignore the instructions below. For more information, see:
15+
- [vcpkg in CMake projects](/vcpkg/users/buildsystems/cmake-integration)
16+
- [Install and use packages with CMake in Visual Studio](/vcpkg/get_started/get-started-vs)
17+
- [vcpkg in MSBuild projects](/vcpkg/users/buildsystems/msbuild-integration)
18+
- [Tutorial: Install and use packages with MSBuild in Visual Studio](/vcpkg/get_started/get-started-msbuild)
1619

1720
## Consuming static libraries
1821

docs/build/cmake-projects-in-visual-studio.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ title: "CMake projects in Visual Studio"
33
description: "How to create and build C++ projects using CMake in Visual Studio."
44
ms.date: 02/14/2022
55
helpviewer_keywords: ["CMake in Visual C++"]
6-
ms.assetid: 444d50df-215e-4d31-933a-b41841f186f8
76
---
87
# CMake projects in Visual Studio
98

@@ -221,7 +220,10 @@ In Visual Studio 2019 version 16.9 and later, Visual Studio automatically config
221220

222221
## Vcpkg integration
223222

224-
CMake projects opened in Visual Studio integrate with vcpkg, a cross-platform C/C++ dependency manager. Before using vcpkg with Visual Studio, you must run `vcpkg integrate install`. For instructions and more information on vcpkg, see the [vcpkg documentation](https://vcpkg.io/).
223+
CMake projects opened in Visual Studio integrate with vcpkg, a cross-platform C/C++ dependency manager. Before using vcpkg with Visual Studio, you must run `vcpkg integrate install`. For instructions and more information about vcpkg, see:
224+
225+
- [Install and use packages with CMake in Visual Studio](/vcpkg/get_started/get-started-vs)
226+
- [vcpkg in CMake projects](/vcpkg/users/buildsystems/cmake-integration)
225227

226228
If *`CMakeSettings.json`* is your active configuration file, Visual Studio automatically passes the vcpkg toolchain file (`vcpkg.cmake`) to CMake. This behavior is disabled automatically when you specify any other toolchain in your CMake Settings configuration.
227229

@@ -399,4 +401,6 @@ In Visual Studio 2015, Visual Studio users can use a [CMake generator](https://c
399401
[`CMakeSettings.json` schema reference](cmakesettings-reference.md)\
400402
[Configure CMake debugging sessions](configure-cmake-debugging-sessions.md)\
401403
[Deploy, run, and debug your Linux project](../linux/deploy-run-and-debug-your-linux-project.md)\
402-
[CMake predefined configuration reference](cmake-predefined-configuration-reference.md)
404+
[CMake predefined configuration reference](cmake-predefined-configuration-reference.md)\
405+
[vcpkg in CMake projects](/vcpkg/users/buildsystems/cmake-integration)\
406+
[Install and use packages with CMake in Visual Studio](/vcpkg/get_started/get-started-vs)

docs/build/creating-and-managing-visual-cpp-projects.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,13 @@ Add source code files, icons, or any other items to your project by right-clicki
5353

5454
## Add third-party libraries to a project
5555

56-
Over 900 C++ open source libraries are available via the [vcpkg](https://vcpkg.io/) package manager. Run the Visual Studio integration step to set up the paths to that library when you reference it from any Visual Studio project.
56+
Over 900 C++ open source libraries are available via the [vcpkg](/vcpkg/) package manager. Run the Visual Studio integration step to set up the paths to that library when you reference it from any Visual Studio project.
57+
58+
For more information about consuming a library that you have downloaded by using the **vcpkg** package manager, see:
59+
- [vcpkg in CMake projects](/vcpkg/users/buildsystems/cmake-integration)
60+
- [Install and use packages with CMake in Visual Studio](/vcpkg/get_started/get-started-vs)
61+
- [vcpkg in MSBuild projects](/vcpkg/users/buildsystems/msbuild-integration)
62+
- [Tutorial: Install and use packages with MSBuild in Visual Studio](/vcpkg/get_started/get-started-msbuild)
5763

5864
They're also commercial third-party libraries that you can install. Follow their installation instructions.
5965

docs/build/get-started-linux-cmake.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,4 +207,5 @@ Learn more about configuring and debugging CMake projects in Visual Studio:
207207
> [Configure CMake debugging sessions](configure-cmake-debugging-sessions.md)<br/><br/>
208208
> [Deploy, run, and debug your Linux project](../linux/deploy-run-and-debug-your-linux-project.md)<br/><br/>
209209
> [CMake predefined configuration reference](cmake-predefined-configuration-reference.md)
210-
>
210+
> [vcpkg in CMake projects](/vcpkg/users/buildsystems/cmake-integration)
211+
> [Install and use packages with CMake in Visual Studio](/vcpkg/get_started/get-started-vs)

docs/build/walkthrough-using-msbuild-to-create-a-visual-cpp-project.md

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,15 @@ This walkthrough demonstrates how to use MSBuild in a command prompt to build a
1414
This walkthrough illustrates these tasks:
1515

1616
- Creating the C++ source files for your project.
17-
1817
- Creating the XML MSBuild project file.
19-
2018
- Using MSBuild to build your project.
21-
2219
- Using MSBuild to customize your project.
2320

2421
## Prerequisites
2522

2623
You need these prerequisites to complete this walkthrough:
2724

2825
- A copy of Visual Studio with the **Desktop development with C++** workload installed.
29-
3026
- A general understanding of the MSBuild system.
3127

3228
::: moniker range="msvc-140"
@@ -57,7 +53,6 @@ In this walkthrough, you'll create a project that has a source file and a header
5753
### To create the C++ source files for your project
5854

5955
1. Create a folder for your project.
60-
6156
1. Create a file named *`main.cpp`* and add this code to the file:
6257

6358
```cpp
@@ -83,9 +78,7 @@ In this walkthrough, you'll create a project that has a source file and a header
8378
An MSBuild project file is an XML file that contains a project root element (`<Project>`). In the example project you'll build, the `<Project>` element contains seven child elements:
8479

8580
- Three item group tags (`<ItemGroup>`) that specify project configuration and platform, source file name, and header file name.
86-
8781
- Three import tags (`<Import>`) that specify the location of Microsoft Visual C++ settings.
88-
8982
- A property group tag (`<PropertyGroup>`) that specifies project settings.
9083

9184
### To create the MSBuild project file
@@ -209,13 +202,9 @@ The application should display "Hello, from MSBuild!" in the console window.
209202
MSBuild enables you to execute predefined build targets, apply user-defined properties, and use custom tools, events, and build steps. This section illustrates these tasks:
210203

211204
- Using MSBuild with build targets.
212-
213205
- Using MSBuild with build properties.
214-
215206
- Using MSBuild with the 64-bit compiler and tools.
216-
217207
- Using MSBuild with different toolsets.
218-
219208
- Adding MSBuild customizations.
220209

221210
### Using MSBuild with Build Targets
@@ -277,7 +266,10 @@ To rebuild your project with the Visual C++ 11.0 Windows XP toolset, enter this
277266
MSBuild provides various ways to customize your build process. These articles show how to add custom build steps, tools, and events to your MSBuild project:
278267

279268
- [How to: Add a Custom Build Step to MSBuild Projects](how-to-add-a-custom-build-step-to-msbuild-projects.md)
280-
281269
- [How to: Add Custom Build Tools to MSBuild Projects](how-to-add-custom-build-tools-to-msbuild-projects.md)
282-
283270
- [How to: Use Build Events in MSBuild Projects](how-to-use-build-events-in-msbuild-projects.md)
271+
272+
## See also
273+
274+
- [vcpkg in MSBuild projects](/vcpkg/users/buildsystems/msbuild-integration)
275+
- [Tutorial: Install and use packages with MSBuild in Visual Studio](/vcpkg/get_started/get-started-msbuild)

docs/code-quality/build-reliable-secure-programs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,4 +453,4 @@ Produce an SBOM (software bill of materials) with your product listing all depen
453453
Microsoft solutions include the following guidance and products:
454454
- [Microsoft Supply Chain Platform | Microsoft](https://www.microsoft.com/microsoft-cloud/solutions/microsoft-supply-chain-platform)
455455
- [Secure your software supply chain | GitHub Security](https://github.com/features/security/software-supply-chain)
456-
- [vcpkg | vcpkg.io](https://vcpkg.io/en/) - vcpkg private registries allow redirection of OSS acquisition to Enterprise-controlled resources for acquiring sources for a dependency, to minimize risk of upstream or over-the-wire attacks.
456+
- [vcpkg](/vcpkg/) - vcpkg private registries allow redirection of OSS acquisition to Enterprise-controlled resources for acquiring sources for a dependency, to minimize risk of upstream or over-the-wire attacks.

docs/code-quality/using-the-cpp-core-guidelines-checkers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ Code Analysis requires a few environment variables and compiler command-line opt
299299

300300
## Use the Guideline Support Library
301301

302-
The Guideline Support Library (GSL) is designed to help you follow the Core Guidelines. The GSL includes definitions that let you replace error-prone constructs with safer alternatives. For example, you can replace a `T*, length` pair of parameters with the `span<T>` type. The GSL project is available on GitHub at [https://github.com/Microsoft/GSL](https://github.com/Microsoft/GSL). The library is open-source, so you can view the sources, make comments, or contribute. You can also use the [vcpkg](https://vcpkg.io/) package manager to download and install the library locally.
302+
The Guideline Support Library (GSL) is designed to help you follow the Core Guidelines. The GSL includes definitions that let you replace error-prone constructs with safer alternatives. For example, you can replace a `T*, length` pair of parameters with the `span<T>` type. The GSL project is available on GitHub at [https://github.com/Microsoft/GSL](https://github.com/Microsoft/GSL). The library is open-source, so you can view the sources, make comments, or contribute. You can also use the [vcpkg](/vcpkg/) package manager to download and install the library locally.
303303

304304
::: moniker range="msvc-140"
305305

docs/error-messages/compiler-errors-1/fatal-error-c1083.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ then the file is not found. Use the correct path relative to the directory speci
5656

5757
## Third-party library issues and vcpkg
5858

59-
If you see this error when you are trying to configure a third-party library as part of your build, consider using [vcpkg](https://vcpkg.io/), a C++ package manager, to install and build the library. vcpkg supports a large and growing [list of third-party libraries](https://github.com/Microsoft/vcpkg/tree/master/ports), and sets all the configuration properties and dependencies required for successful builds as part of your project.
59+
If you see this error when you are trying to configure a third-party library as part of your build, consider using [vcpkg](/vcpkg/), a C++ package manager, to install and build the library. vcpkg supports a large and growing [list of third-party libraries](https://github.com/Microsoft/vcpkg/tree/master/ports), and sets all the configuration properties and dependencies required for successful builds as part of your project.
6060

6161
## The file is in your project, but not the include search path
6262

docs/error-messages/tool-errors/linker-tools-error-lnk1104.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ There are several common causes for this issue:
6666

6767
To fix a path issue for command-line builds, verify the LIB environment variable is set. Make sure it includes paths for all the libraries you use, and for every configuration you build. In the IDE, the library paths get set by the **VC++ Directories** > **Library Directories** property. Make sure all the directories that contain the libraries you need are listed here, for every configuration you build.
6868

69-
You might need to supply a library directory that overrides a standard library directory. On the command line, use the [/LIBPATH](../../build/reference/libpath-additional-libpath.md) option. In the IDE, use the **Additional Library Directories** property in the **Configuration Properties > Linker > General** property page for your project.
69+
You might need to supply a library directory that overrides a standard library directory. On the command line, use the [`/LIBPATH`](../../build/reference/libpath-additional-libpath.md) option. In the IDE, use the **Additional Library Directories** property in the **Configuration Properties > Linker > General** property page for your project.
7070

71-
Make sure you install every version of the library you need for the configurations you build. Consider using the [vcpkg](https://vcpkg.io/) package management utility to automate the installation and setup for many common libraries. When you can, it's best to build your own copies of third-party libraries. Then you're sure to have all the libraries' local dependencies, built for the same configurations as your project.
71+
Make sure you install every version of the library you need for the configurations you build. Consider using the [vcpkg](/vcpkg/) package management utility to automate the installation and setup for many common libraries. When you can, it's best to build your own copies of third-party libraries. Then you're sure to have all the libraries' local dependencies, built for the same configurations as your project.
7272

7373
## Can't open a file built by your project
7474

docs/error-messages/tool-errors/linker-tools-error-lnk2019.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ A static library that was built using a version of Visual Studio before Visual S
9494

9595
## Third-party library issues and vcpkg
9696

97-
If you see this error when you're trying to configure a third-party library as part of your build, consider using [vcpkg](https://vcpkg.io/). **vcpkg** is a C++ package manager that uses your existing Visual Studio tools to install and build the library. **vcpkg** supports a large and growing [list of third-party libraries](https://github.com/Microsoft/vcpkg/tree/master/ports). It sets all the configuration properties and dependencies required for successful builds as part of your project.
97+
If you see this error when you're trying to configure a third-party library as part of your build, consider using [vcpkg](/vcpkg/). **vcpkg** is a C++ package manager that uses your existing Visual Studio tools to install and build the library. **vcpkg** supports a large and growing [list of third-party libraries](https://github.com/Microsoft/vcpkg/tree/master/ports). It sets all the configuration properties and dependencies required for successful builds as part of your project.
9898

9999
## Diagnosis tools
100100

0 commit comments

Comments
 (0)