LLVM 3.5无法链接

时间:2014-01-31 10:12:17

标签: llvm

使用实验性LLVM3.5库链接进行编译时,会出现以下链接错误:

  

/usr/lib/llvm-3.5/lib/libLLVMSupport.a(Process.o):在功能中   llvm::sys::Process::FileDescriptorHasColors(int)': (.text+0x85b): undefined reference to setupterm”   /usr/lib/llvm-3.5/lib/libLLVMSupport.a(Process.o):In function   llvm::sys::Process::FileDescriptorHasColors(int)': (.text+0x87a): undefined reference to tigetnum”   /usr/lib/llvm-3.5/lib/libLLVMSupport.a(Process.o):In function   llvm::sys::Process::FileDescriptorHasColors(int)': (.text+0x888): undefined reference to set_curterm”   /usr/lib/llvm-3.5/lib/libLLVMSupport.a(Process.o):In function   llvm::sys::Process::FileDescriptorHasColors(int)': (.text+0x890): undefined reference to del_curterm'

链接命令行是使用llvm-config生成的,为什么会失败?

2 个答案:

答案 0 :(得分:17)

llvm-config未添加Terminfo库的链接选项。添加

-ltinfo

要在图书馆中链接,一切都应该很好。

答案 1 :(得分:15)

在链接选项

中添加llvm-config --system-libs