Porting third-party libraries
When you upgrade a project from Visual Studio 2013 or earlier to the current version of Visual C++, you also have to upgrade any libraries that the project uses. The library and your project must be built by compatible versions and targets of the compiler toolset. If you don't have access to the library source code, and the library isn't available through vcpkg, then you must obtain an updated binary from the library vendor. For more information, see Overview of potential upgrade issues.
When you upgrade an application from Visual Studio 2015 or later, it isn't necessary to upgrade dependencies because the code generated by those versions is binary-compatible. For more information, see C++ binary compatibility between Visual Studio versions.
Use vcpkg for open-source libraries
In the past, finding and upgrading third-party libraries was sometimes a non-trivial task. To make it easier to acquire and rebuild C++ third-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
files, the .lib
files, 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. Visual Studio will automatically add the library path to your project settings and copy the DLL to your solution folder. For more information, see vcpkg.
Reporting issues
If your open-source library isn't found in the vcpkg catalog, you can open an issue on the GitHub repo. That's where the community and the Visual C++ team can see it and potentially create the port file for this library.