• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Errors linking against libLLVMCore
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Errors linking against libLLVMCore


  • Subject: Re: Errors linking against libLLVMCore
  • From: "Glenn L. Austin" <email@hidden>
  • Date: Wed, 26 Dec 2012 00:48:55 -0800

On Dec 25, 2012, at 10:39 PM, Rick Mann <email@hidden> wrote:

> I'm trying to make a library in Xcode that links against LLVM. I used the STL C++ template in Xcode 4.5.2, added libLLVMCore.a and libLLVMSupport.a to the link binaries phase, and made this call in my code:
>
> 	llvm::LLVMContext& llvmCTX = llvm::getGlobalContext();
>
> I get link errors against std::string and other STL classes:
>
> Undefined symbols for architecture x86_64:
> "std::string::copy(char*, unsigned long, unsigned long) const", referenced from:
>     llvm::sys::Path::makeUnique(bool, std::string*) in libLLVMSupport.a(Path.o)
> "std::string::find(char const*, unsigned long, unsigned long) const", referenced from:
>     llvm::sys::getDefaultTargetTriple() in libLLVMSupport.a(Host.o)
>     .
>     .
>     .
>
> Builds fine if I take out that line (the only line, so far) of LLVM code.
>
> But code like this compiles fine:
>
> 	std::string s = "Hello world";
> 	std::printf("%s", s.c_str());
>
> I figure I'm missing a lib, but I have no idea which.


With STL, it's rare that you'll be missing a library -- it's FAR more likely that you're not including the proper header (stringfwd instead of string, for example).

--
Glenn L. Austin, Computer Wizard and Race Car Driver         <><
<http://www.austin-soft.com>


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Errors linking against libLLVMCore
      • From: Rick Mann <email@hidden>
References: 
 >Errors linking against libLLVMCore (From: Rick Mann <email@hidden>)

  • Prev by Date: Errors linking against libLLVMCore
  • Next by Date: Re: Errors linking against libLLVMCore
  • Previous by thread: Errors linking against libLLVMCore
  • Next by thread: Re: Errors linking against libLLVMCore
  • Index(es):
    • Date
    • Thread