Starting with VS2015 Update 1 you can install the "Clang with Microsoft CodeGen" template via the New Project window, browse to Installed -> Templates -> Visual C++ -> Cross Platform.
You will then be able to choose the Clang 3.7 with Microsoft CodeGen v140_clang_3_7
Platform Toolset in the properties page of any Windows C++ project.
Clang has a completely different set of command-line options which it recognizes, so when using the v140_clang_3_7
toolset, the project properties must be using Clang-compatible options, which can be recognized as starting with -
instead of /
. For example, Debug Information Format property set to "Full Debug Information (DWARF2) (-g2 -gdwarf-2
)", and Enable C++ Exceptions property set to "Yes (-fexceptions
)".
There's more information in this blog post.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…