Generate a JSON Compilation Database inside Visual Studio
When LLVM started to take over most of the C++ industry, many developers wanted to compile their existing Visual Studio C++ projects using the Clang compiler.
In order to do that, you need to create a JSON Compilation Database, and here Clang Power Tools comes into play.
Generate a JSON Compilation Database
Using the Context Menu from the Solution Explorer is the traditional way to access the main actions for a Visual Studio project, so this is exactly what you are going to do next.
- Right-click on the Visual Studio project to open the Context Menu.
- Select the Clang Power Tools option.
- In the opened submenu, choose Export Compilation Database.
- File Explorer is automatically opened with the JSON Compilation Database selected.
Watch our video tutorial to see the JSON Compilation Database in action.
At this point, you have everything you need to generate your own JSON Compilation Database files and start using the Clang compiler on your C++ Visual Studio projects.
Clang Power Tools and all of its features are available on Visual Studio 2015, 2017 and 2019.