I'm trying to link make use of the llvm compiler libraries, but I can't get them to link to my program correctly.
I get an error like:Code:#include <llvm/Constants.h> #include <llvm/DerivedTypes.h> int main(){ llvm::APInt(1,0); return 0; }
undefined reference to `llvm::APInt::initSlowCase(unsigned int, unsigned long long, bool)
(this function is called by the inline APInt constructor)
The library seems to be found correctly; it doesn't give any other errors. Using nm I can see the mangled function initSlowCase exactly where I expect it to be (though I cannot verify that the mangling is correct). I'm out of ideas of that could be wrong.
I'm using kubuntu 12.04. Same error occurs with both clang++ and g++.