LLVM 3.5 fails to link

 ̄綄美尐妖づ 提交于 2019-12-05 13:19:33

问题


When compiling with the experimental LLVM3.5 libraries link the following link errors appear:

/usr/lib/llvm-3.5/lib/libLLVMSupport.a(Process.o): In function llvm::sys::Process::FileDescriptorHasColors(int)': (.text+0x85b): undefined reference tosetupterm' /usr/lib/llvm-3.5/lib/libLLVMSupport.a(Process.o): In function llvm::sys::Process::FileDescriptorHasColors(int)': (.text+0x87a): undefined reference totigetnum' /usr/lib/llvm-3.5/lib/libLLVMSupport.a(Process.o): In function llvm::sys::Process::FileDescriptorHasColors(int)': (.text+0x888): undefined reference toset_curterm' /usr/lib/llvm-3.5/lib/libLLVMSupport.a(Process.o): In function llvm::sys::Process::FileDescriptorHasColors(int)': (.text+0x890): undefined reference todel_curterm'

The link command line was generated with llvm-config, so why is this failing?


回答1:


llvm-config is not adding the link option for the Terminfo library. Add

-ltinfo

To link in the library and all should be well.




回答2:


Add llvm-config --system-libs in link option



来源:https://stackoverflow.com/questions/21477407/llvm-3-5-fails-to-link

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!