Hayrapetyan, Anahit via llvm-dev
2017-Sep-12 17:26 UTC
[llvm-dev] Link error: undefined reference to APIInt functions
Hi, I’m getting link error when compiling an executable where llvm::APIInt is used. Following is the error: /usr/local/include/llvm/ADT/APInt.h:1372: undefined reference to `llvm::APInt::countLeadingZerosSlowCase() const' The source file is a simple program, where ConstantInt’s getZExtValue function is called. If I comment out this part, everything goes just fine. uint64_t val = or_const_op->getZExtValue(); Could you please suggest what the cause of this problem might be? Thanks, Anahit. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170912/c507b3c0/attachment.html>
Krzysztof Parzyszek via llvm-dev
2017-Sep-12 20:34 UTC
[llvm-dev] Link error: undefined reference to APIInt functions
You need to link libLLVMSupport.a with your program. -Krzysztof On 9/12/2017 12:26 PM, Hayrapetyan, Anahit via llvm-dev wrote:> Hi, > > > I’m getting link error when compiling an executable where llvm::APIInt > is used. > > Following is the error: > > > /usr/local/include/llvm/ADT/APInt.h:1372: undefined reference to > `llvm::APInt::countLeadingZerosSlowCase() const' > > The source file is a simple program, where ConstantInt’s getZExtValue > function is called. If I comment out this part, everything goes just fine. > > > uint64_t val = or_const_op->getZExtValue(); > > > Could you please suggest what the cause of this problem might be? > > > Thanks, > > Anahit. > > > > > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation