How to compile C++ for Windows with clang in Visual Studio 2015

后端 未结 4 2037
死守一世寂寞
死守一世寂寞 2021-01-30 16:48

As far as I understand, Visual Studio 2015 is shipped with clang. First I though this was only for Android and iOS apps, but according to this article it should also be possible

4条回答
  •  一整个雨季
    2021-01-30 17:18

    While the above solutions work they require that you have installed clang which is off by default in the visual studio 2015 installation. The accepted answer does show how to install it, though the next page will ask you to close visual studio which you are running the new project from.

    If anyone is wondering how to install clang because it does not show up in their list here is another solution:

    1. Control Panel->Programs->Programs and Features.
    2. Right click on “Microsoft Visual Studio Enterprise 2015” (or “Microsoft Visual
    3. Studio 15 Preview” if you have the preview of the next version of Visual Studio installed)
    4. Click “Change”
    5. Click “Modify”
    6. Select “Clang with Microsoft CodeGen” – The March 2016 release.

    https://blogs.msdn.microsoft.com/vcblog/2016/03/31/clang-with-microsoft-codegen-march-2016-released/

提交回复
热议问题