我正在使用OSX 10.11,我从llvm.org安装了LLVM和clang
/usr/local/bin/clang++ -v
clang version 3.8.0 (http://llvm.org/git/clang.git e2c22771566f2f28db1f4a9b2b0191ff9f2ae90c) (http://llvm.org/git/llvm.git 7a2d52ce5de3372b030c296bbfe70dedb29b46d3)
Target: x86_64-apple-darwin15.0.0
Thread model: posix
InstalledDir: /usr/local/bin
但是,当我尝试构建某些内容时,发生了错误:
/usr/local/bin/clang++ -I. -c -g -O2 -fno-rtti `llvm-config --cxxflags` -o
LoopExtractAction.o LoopExtractAction.cpp
In file included from LoopExtractAction.cpp:15:
In file included from ./LoopExtractAction.h:20:
In file included from /usr/local/include/clang/Lex/MacroInfo.h:18:
In file included from /usr/local/include/clang/Lex/Token.h:18:
In file included from /usr/local/include/clang/Basic/SourceLocation.h:18:
In file included from /usr/local/include/clang/Basic/LLVM.h:22:
In file included from /usr/local/include/llvm/Support/Casting.h:19:
/usr/local/include/llvm/Support/type_traits.h:17:10: fatal error: 'type_traits'
file not found
#include <type_traits>
似乎llvm/Support/type_traits.h
包含type_traits
。我该如何解决这个问题?