Using clang with codeblocks on Windows 7

前端 未结 3 1156
眼角桃花
眼角桃花 2021-02-10 13:59

I have managed to build clang on Windows 7 using Visual Studio 210 and now I like to use it with the codeblocks IDE. So I copied the clang executables into the mingw bin\\ folde

3条回答
  •  遥遥无期
    2021-02-10 14:29

    clang does not support MSVC C++ ABI yet so C++ code cannot be compiled correctly.

    Update: As of December 2014, clang does support MSVC except (heh) exceptions. To compile code you will have to do

    clang-cl.exe /D_HAS_EXCEPTIONS=0 foo.cpp
    

    If you want to use clang.exe directly:

    clang++ -target i686-pc-windows-msvc -D_HAS_EXCEPTIONS=0 foo.cpp -o foo.exe
    

    etc.

    For up to date status of MSVC support see http://clang.llvm.org/docs/MSVCCompatibility.html

提交回复
热议问题