• 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: non_lazy_ptr in general
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: non_lazy_ptr in general


  • Subject: Re: non_lazy_ptr in general
  • From: "Chris Suter" <email@hidden>
  • Date: Thu, 13 Nov 2008 14:13:42 +1100

On Thu, Nov 13, 2008 at 1:13 PM, Nick Zitzmann <email@hidden> wrote:
> Yesterday, I was building some open source code that depended on a
> third-party library, liboil. Liboil is a library that defines most of its
> symbols as generic pointers, then provides architecture-specific
> implementations of each function, and these implementations are assigned to
> the memory addresses of those pointers at initialization time. I'm guessing
> they did this so they could support a very broad number of architectures and
> CPU features.
>
> The problem is, when linking it against the project that was using it, I got
> a linker error like this:
>
> Undefined symbols:
>  "_some_function", referenced from:
>     _some_function$non_lazy_ptr in some_source.o
>
> So I searched Google for non_lazy_ptr, and saw lots of other people who have
> had this problem compiling various projects out there on Mac OS X, and no
> one really knew what was causing this to happen, or how to fix it.
>
> So what causes these non_lazy_ptr linker errors, and how do I properly fix
> them? My interim solution was to use the -U linker option to make the linker
> dynamically look up the symbol, but I suspect that wasn't the correct
> solution...

I think the non_lazy_ptr part of your problem is a red herring.
They're just created to add a level of indirection. The linker cannot
resolve _some_function and that suggests you're not correctly linking
with the liboil library. By the way, from what you've described,
_some_function sounds like it's actually a variable that happens to
points to a function, rather than a function.

-- Chris
 _______________________________________________
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

References: 
 >non_lazy_ptr in general (From: Nick Zitzmann <email@hidden>)

  • Prev by Date: non_lazy_ptr in general
  • Next by Date: Re: XCode 3 auto-indent
  • Previous by thread: non_lazy_ptr in general
  • Next by thread: Re: non_lazy_ptr in general
  • Index(es):
    • Date
    • Thread