【发布时间】:2019-09-16 11:09:56
【问题描述】:
我正在尝试使用 LLVM 来构建编译器后端,但我陷入了链接器错误的泥潭。目前我试图做的只是包含 LLVMContext.h(我正在做 IBM tutorial),但这给了我以下链接器错误:
$ g++ -o compiler *.o -L/home/jakob/llvm2/lib/*.a -lantlr4-runtime
BayesBaseListener.o:(.data.rel+0x0): undefined reference to `llvm::DisableABIBreakingChecks'
collect2: error: ld returned 1 exit status
Makefile:2: recipe for target 'compiler' failed
make: *** [compiler] Error 1
知道如何正确配置 LLVM 以免发生这种情况吗?
【问题讨论】:
标签: c++ compiler-construction llvm llvm-ir llvm-c++-api