I am getting an following error while preprocessing a file.
LLVMSymbolizer: error while reading file: PDB Error: DIA is not installed on the system.
The details of the error are shown in the attached screenshot.
I am using clang 6.0.1 ,Microsoft visual studio 2015 update 3, and windows 10 operating system.
Please let me know how to proceed.
Thanks and Regards
Older versions of clang/llvm relied on DIA to read PDB files on Windows. It’s usually installed with Visual Studio, but perhaps you selected an option to omit it or the directory isn’t in your PATH.
This page talks about where DIA was typically installed by VS 2015:
If it’s there, then you probably just need to add it to your PATH. (Using a Visual Studio command prompt or invoking the vcvarsall.bat file is a pretty reliable way to make sure everything for VS is set up in your environment.)
If DIA is not there, you might want to spin up your VS installer and see if there’s an option to install it.
LLVM has a “native” PDB reader that tools can use instead of relying on DIA, but I don’t remember how well that worked in LLVM 6 (if at all). Most tools now default to the native reader, but for transitional versions, some tools had a command line option to select the native PDB reader. All (almost all?) of them also checked for an environment variable: LLDB_USE_NATIVE_PDB_READER=TRUE