【发布时间】:2016-11-07 17:13:24
【问题描述】:
我正在尝试编译一个需要 llvm 标头的简单文件。
#include <llvm/IR/Module.h>
int main() {
return 0;
}
我在 mac 操作系统上。我使用以下命令编译代码。
g++ s.cpp `llvm-config --cxxflags --system-libs --ldflags --libs core`
我需要从源代码构建 llvm 吗? 有什么遗漏吗?
【问题讨论】:
-
您看到了什么错误?您可能需要安装 LLVM。例如
brew install llvm -
我最终在 docker 中使用了 ubuntu 14.04 并在其中安装了 llvm。
-
不会 brew install llvm built-in llvm 自带 os x。
-
我试过这个。 llvm 已安装,但我得到同样的错误。
-
你能把
llvm-config --cxxflags --system-libs --ldflags --libs core的输出贴出来
标签: c++ macos compilation compiler-errors llvm