Clang on Windows

前端 未结 2 1119
醉酒成梦
醉酒成梦 2020-12-13 07:07

First of all, I\'ve followed \"Getting Started: Building and Running Clang\". In particular, I\'ve built it according to \"Using Visual Studio\" section. In other words, I\'

2条回答
  •  遥遥无期
    2020-12-13 07:38

    If you build Clang with MSVS, it will automatically search the default VS include paths, and pull in those headers. This is the reason the libstdc++ headers are producing errors: they are importing C functions not present in the VS headers. Using Clang for C++ with VS is for now a no-go: you will get link failures due to missing ABI (name mangling and others) functionality in Clang. If you still want to use the MSVS Clang, don't point it to MinGW headers. It will parse the VS headers (including C++), it just will fail to link.


    EDIT: I have built a dw2 version of GCC (32-bit only) accompanied by Clang. Exceptions work in this build, and so you can build real C++ stuff with Clang now on Windows. Get version 3.2 here.

提交回复
热议问题