non_lazy_ptr in general
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