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

non_lazy_ptr in general


  • Subject: non_lazy_ptr in general
  • From: Nick Zitzmann <email@hidden>
  • Date: Wed, 12 Nov 2008 19:13:31 -0700

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...

Nick Zitzmann
<http://seiryu.home.comcast.net/>



_______________________________________________
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: non_lazy_ptr in general
      • From: Bob Clark <email@hidden>
    • Re: non_lazy_ptr in general
      • From: "Chris Suter" <email@hidden>
  • Prev by Date: Re: Verifying Code Signing Identity
  • Next by Date: Re: non_lazy_ptr in general
  • Previous by thread: Re: Verifying Code Signing Identity
  • Next by thread: Re: non_lazy_ptr in general
  • Index(es):
    • Date
    • Thread