Compiler construction 解析C++代码的CLANAPI 我需要CLANAPI来解析C++程序。我安装了Clang2.9和llvm。安装进行得很顺利,现在我发现我还需要安装libc++。问题是,当我试图从源代码“生成”libc++时,会出现以下错误

Compiler construction 解析C++代码的CLANAPI 我需要CLANAPI来解析C++程序。我安装了Clang2.9和llvm。安装进行得很顺利,现在我发现我还需要安装libc++。问题是,当我试图从源代码“生成”libc++时,会出现以下错误,compiler-construction,clang,Compiler Construction,Clang,[4%]正在构建CXX对象库/cmakfiles/CXX.dir/\uu u/src/iostream.cpp.o 在/home/vmplanet/usr/libcxx/include/typeinfo:61:0包含的文件中 from /home/vmplanet/usr/libcxx/include/memory:590, from /home/vmplanet/usr/libcxx/include/algorithm:594,

[4%]正在构建CXX对象库/cmakfiles/CXX.dir/\uu u/src/iostream.cpp.o

在/home/vmplanet/usr/libcxx/include/typeinfo:61:0包含的文件中

             from /home/vmplanet/usr/libcxx/include/memory:590,

             from /home/vmplanet/usr/libcxx/include/algorithm:594,

             from /home/vmplanet/usr/libcxx/include/string:434,

             from /home/vmplanet/usr/libcxx/include/__locale:15,

             from /home/vmplanet/usr/libcxx/include/ios:216,

             from /home/vmplanet/usr/libcxx/include/ostream:130,

             from /home/vmplanet/usr/libcxx/include/__std_stream:15,

             from /home/vmplanet/usr/libcxx/src/iostream.cpp:10:
/home/vmplanet/usr/libcxx/include/exception:在成员函数“std::exception_ptr::operator bool const”中:

/主页/vmplanet/usr/libcxx/include/exception:134:59:错误:与“操作员”不匹配在常数中

std::exception\u ptr*此->std::exception\u ptr::\u ptr!=std::_1::_get_nullptr_t' /home/vmplanet/usr/libcxx/include/cstdef:76:39:注意:候选对象是:bool std::_1::operator=std::_1::nullptr\t, std::uu 1::nullptr\t

生成[2]:*[lib/CMakeFiles/cxx.dir/_u/src/iostream.cpp.o]错误1

生成[1]:*[lib/CMakeFiles/cxx.dir/all]错误2


make:[all]Error 2

使用gcc 4.2.0附带的libstdc++或当前Clang trunk附带补丁的更新版本。您正在尝试构建的版本目前仅适用于Mac OS X。但使用libstdc++会在include和typeof等方面出现错误。@Aditya Kumar,请使用4.2.0或更高版本,已知该版本与Clang兼容。最近的libstdc++版本使用了太多的C++0x,超出了当前在Clang中的支持级别。当然,在阅读了下面的文章后,我有了一些信心,并尝试首先构建libcxx。我在$LIBCXX_DIR/lib/buildit.sh中做了必要的更改,我做了。/buildit,在编译locale.cpp时出现了编译错误。错误似乎出现在文件$LIBCXX_DIR/include/string error:../include/string:2122:10:错误:重载解析所选已删除运算符“=”\u r=STD::move\u str.\ur;