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
{{ message }}
Repository navigation
Commit ec2b9de
Browse filesBrowse the repository at this point in the historyBrowse files
title: "Migrating Third-Party Libraries | Microsoft Docs"
3
+
ms.custom: ""
4
+
ms.date: "01/10/2017"
5
+
ms.reviewer: ""
6
+
ms.suite: ""
7
+
ms.technology:
8
+
- "devlang-cpp"
9
+
ms.tgt_pltfrm: ""
10
+
ms.topic: "article"
11
+
dev_langs:
12
+
- "C++"
13
+
helpviewer_keywords:
14
+
- "3rd-party libraries"
15
+
- "vspkg"
16
+
ms.assetid: b055ed20-8a9e-45b2-ac2a-e3d94271c009
17
+
caps.latest.revision: 0
18
+
author: "mikeblome"
19
+
ms.author: "mblome"
20
+
manager: "ghogen"
21
+
translation.priority.ht:
22
+
- "cs-cz"
23
+
- "de-de"
24
+
- "es-es"
25
+
- "fr-fr"
26
+
- "it-it"
27
+
- "ja-jp"
28
+
- "ko-kr"
29
+
- "pl-pl"
30
+
- "pt-br"
31
+
- "ru-ru"
32
+
- "tr-tr"
33
+
- "zh-cn"
34
+
- "zh-tw"
35
+
---
36
+
When you upgrade a project to the current version of Visual C++, you also have to upgrade any libraries that the project uses, so that the library and your project are built with the same version and flavor of the compiler. (For more information, see [Overview of potential upgrade issues](overview-of-potential-upgrade-issues-visual-cpp.md)).
37
+
38
+
## Introducing vcpkg
39
+
In the past, finding and upgrading 3rd party libraries was sometimes a non-trivial task. To make it easier to acquire and rebuild C++ 3rd party open source libraries, the Visual C++ team has created a command-line tool called the **VC++ Packaging Tool** or **vcpkg**. Vcpkg has a searchable catalog of many popular C++ open-source libraries. You can install any library in the catalog directly from the vcpkg command line. When you install a library, Vcpkg creates a directory tree on your machine and adds the .h, the .lib and binaries in this folder. You can use this folder in your compilation command line, or integrate it into Visual Studio 2015 or later by using the vcpkg integrate install command. After you integrate a library location, Visual Studio can find it and add it to any new project that you create. To use a library, just #include it, and Visual Studio will automatically add the .lib path to your project settings and copy the dll to your solution folder.
40
+
41
+
## Acquisition and Usage
42
+
43
+
You can download vcpkg from the [vcpkg GitHub repo][vcpkg](https://github.com/Microsoft/vcpkg/).
44
+
45
+
- To search a library in the catalog run: vcpkg search <LibName>
46
+
- To acquire a library just run: vcpkg install boost
47
+
- To list the already installed libs run: vcpkg list
48
+
49
+
The blog post [Vcpkg: a tool to acquire and build C++ open source libraries on Windows](https://blogs.msdn.microsoft.com/vcblog/2016/09/19/vcpkg-a-tool-to-acquire-and-build-c-open-source-libraries-on-windows/) explains how vcpkg works and gives a list of supported libraries. The list is updated every week.
50
+
51
+
## Reporting issues
52
+
If your library is not present in vcpkg catalog, you can open an issue on the [GitHub repo](https://github.com/Microsoft/vcpkg/issues) where the community and the Visual C++ team can see it and potentially create the port file for this library.
53
+
54
+
For proprietary 3rd party libraries (non-open source) we recommend that you contact the library provider. However, we are interested to know of any proprietary libs you are using and block you, let us know which one you depend on (you can contact us at vcupgrade@microsoft.com).
55
+
56
+
57
+
## See Also
58
+
[Visual C++ Porting and Upgrading Guide](visual-cpp-porting-and-upgrading-guide.md)
Copy file name to clipboardExpand all lines: docs/porting/visual-cpp-porting-and-upgrading-guide.md
+7-9Lines changed: 7 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,7 +41,7 @@ This topic provides a guide for upgrading Visual C++ code. This includes getting
41
41
42
42
- Faster builds, due to performance improvements in the compiler itself.
43
43
44
-
-Language features. Visual C++ now implements many features from the newer C++ standards.
44
+
-Improved standards conformance. Visual C++ now implements many features from the latest C++ standards.
45
45
46
46
- Better security. Security features such as guard checking.
47
47
@@ -53,15 +53,13 @@ This topic provides a guide for upgrading Visual C++ code. This includes getting
53
53
If you are not using Visual Studio's build system, you should consider upgrading to use MSBuild. If you upgrade to use MSBuild, you might have an easier time in future upgrades, and it will be easier to use services such as Visual Studio Online. MSBuild supports all the target platforms that Visual Studio supports.
54
54
55
55
### Porting Visual Studio Projects
56
-
For larger projects, you might want to upgrade just one Visual Studio version at a time, because otherwise it can be hard to know what version introduced a particular breaking change that affected your code.
57
-
58
-
To start upgrading a project or solution, just open the solution in the new version of Visual Studio, and follow the prompts to start upgrading it. When you upgrade a project, you get an upgrade report, which is also saved in your project folder as UpgradeLog.htm. The upgrade report shows a summary of what problems were encountered during the upgrade process and some information about changes that were made, or problems that could not be addressed automatically.
56
+
To start upgrading a project or solution, just open the solution in the new version of Visual Studio, and follow the prompts to start upgrading it. When you upgrade a project, you get an upgrade report, which is also saved in your project folder as UpgradeLog.htm. The upgrade report shows a summary of what problems were encountered during the upgrade process and some information about changes that were made, or problems that could not be addressed automatically.
59
57
60
58
1. Project properties
61
59
62
60
2. Include files
63
61
64
-
3. Code that no longer compiles cleanly due to compiler conformance changes
62
+
3. Code that no longer compiles cleanly due to compiler conformance imrovements or changes in the standard
65
63
66
64
4. Code that relies on Visual Studio or Windows features that are no longer available or header files that either aren't included in a default installation of Visual Studio, or were removed from the product
67
65
@@ -79,16 +77,15 @@ This topic provides a guide for upgrading Visual C++ code. This includes getting
79
77
80
78
1. New warnings might mean you want to clean up your code. Depending on the specific diagnostics, this can improve the portability, standards conformance, and security of your code.
81
79
82
-
2. You might want to take advantage of new compiler features such as the [/guard:cf (Enable Flow Control Guard)](../build/reference/guard-enable-control-flow-guard.md) compiler option, which adds checks for unauthorized code execution.
80
+
2. You might want to take advantage of newer compiler features such as the [/guard:cf (Enable Flow Control Guard)](../build/reference/guard-enable-control-flow-guard.md) compiler option, which adds checks for unauthorized code execution.
83
81
84
82
3. You might want to update some code to use new language features that simplify the code, improve the performance of your programs, or update the code to use modern libraries and conform to modern standards and best practices.
85
83
86
-
Once you've upgraded your project (and tested it), you might also want to consider improving your code further or plan the future direction of your code, or even reconsider the architecture of your project. Will it be important for your code to run on other platforms? If so, what platforms? C++ is a standardized langauge designed with portability and cross-platform development in mind, and yet the code for many Windows applications is strongly tied to the Windows platform. Do you want to refactor your code, to separate out those parts that are more tied to the Windows platform?
84
+
Once you've upgraded and tested your project, you might also want to consider improving your code further or plan the future direction of your code, or even reconsider the architecture of your project. Will it receive ongoing development work? Will it be important for your code to run on other platforms? If so, what platforms? C++ is a standardized langauge designed with portability and cross-platform development in mind, and yet the code for many Windows applications is strongly tied to the Windows platform. Do you want to refactor your code, to separate out those parts that are more tied to the Windows platform?
87
85
88
86
What about your user interface? If you are using MFC, you might want to update the UI. Are you using any of the newer MFC features that were introduced in 2008 as a Feature Pack? If you just want to give your app a newer look and feel, without rewriting the entire app, you might consider using the ribbon APIs in MFC, or using some of new features of MFC.
89
87
90
-
To add a new Windows desktop user interface, you could use C++/CX (component extensions), or add managed code in C# and an interoperability layer in C++/CLI to connect C# with your native code.
91
-
88
+
If you want to give your program a XAML user-interface but don't want to create a UWP app, you can use C# with WPF to create the UI layer and refactor your standard C++ logic into DLLs. Create an interoperability layer in C++/CLI to connect C# with your native code. Another option is to create a UWP app using [C++/CX](https://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh699871.aspx) or [C++/WinRT](https://github.com/microsoft/cppwinrt). In Windows 10, you can use the [Desktop App Converter](https://msdn.microsoft.com/en-us/windows/uwp/porting/desktop-to-uwp-run-desktop-app-converter) to package your existing desktop application as a UWP app without having to modify any code.
92
89
Alternatively, perhaps you now have new requirements, or you can foresee the need for targeting platforms other than Windows desktop, such as Windows Phone, or Android devices. You could port your user interface code to a cross-platform UI library. With these UI frameworks, you can target multiple devices and still use Visual Studio and the Visual Studio debugger as your development environment.
93
90
94
91
## Related Topics
@@ -98,6 +95,7 @@ This topic provides a guide for upgrading Visual C++ code. This includes getting
98
95
|[Upgrading Projects from Earlier Versions of Visual C++](../porting/upgrading-projects-from-earlier-versions-of-visual-cpp.md)|Discusses how to use projects created in earlier versions of Visual C++.|
99
96
|[Visual C++ change history 2003 - 2015](../porting/visual-cpp-change-history-2003-2015.md)|A list of all the changes in the Visual C++ libraries and build tools since 2003 that might require changes in your code.|
100
97
|[Visual C++ What's New 2003 through 2015](../porting/visual-cpp-what-s-new-2003-through-2015.md)|All the "what's new" information for Visual C++ going back to Visual Studio 2003.|
98
+
|[Porting 3rd-party libraries](porting-third-party-libraries.md)|How to use the **vcpkg** command line tool to port older open-source libraries to versions compiled with more recent Visual C++ toolsets.|
101
99
|[Porting and Upgrading: Examples and Case Studies](../porting/porting-and-upgrading-examples-and-case-studies.md)|For this section, we ported and upgrades several samples and applications and discussed the experiences and results. You might find that reading these gives you a sense of what is involved in the porting and upgrading process. Throughout the process, we discuss tips and tricks for upgrading and show how specific errors were fixed.|
102
100
|[Porting to the Universal Windows Platform](../porting/porting-to-the-universal-windows-platform-cpp.md)|Contains information about porting code to Windows 10|
103
101
|[Introduction to Visual C++ for UNIX Users](../porting/introduction-to-visual-cpp-for-unix-users.md)|Provides information for UNIX users who are new to [!INCLUDE[vcprvc](../build/includes/vcprvc_md.md)] and want to become productive with it.|
0 commit comments