[LLVMdev] Errors linking against libLLVMCore
Rick Mann
rmann at latencyzero.com
Thu Dec 27 16:41:48 PST 2012
On Dec 27, 2012, at 10:24 , John Criswell <criswell at illinois.edu> wrote:
> It is possible (but a bit unlikely) that your problem is because you're not linking in libstdc++. Some C++ methods are defined in header files; that might explain why your simple program works but using libLLVMVMCore.a doesn't work.
>
> Try using std::string::find() in your simple program and see if it links. If it doesn't, then I think you just need to add -lstdc++.
I've been comparing how the clang++ CLI builds vs how Xcode builds. For one, Xcode does separate clang -x c++ and clang++ (for linking) steps.
Xcode calls clang++ with -stdlib=libc++.
http://pastebin.com/n9nCat15
Here's the output of each eith -### added (not the Xcode link step);
http://pastebin.com/kufBknaw
--
Rick
More information about the llvm-dev
mailing list