Re: CFBundleGetFunctionPointerForName
Re: CFBundleGetFunctionPointerForName
- Subject: Re: CFBundleGetFunctionPointerForName
- From: "Sherm Pendley" <email@hidden>
- Date: Thu, 13 Mar 2008 14:04:54 -0400
I've no idea as to why. I was having a similar problem, and I saw a note in a man page that the underscore prefix is sometimes required, depending on how the binary was linked. Adding the underscore to the symbols I was trying to resolve cured the problem, so I didn't dig any deeper than that.
The dyld source code is probably available as part of Darwin, if you're really curious.
sherm--
On Thu, Mar 13, 2008 at 1:39 PM, Nava Carmon <
email@hidden> wrote:
Why it does find it "as is" without prefix when I add it to the bundle project and remove it from the static library?
On Mar 13, 2008, at 6:09 PM, Sherm Pendley wrote:
On Thu, Mar 13, 2008 at 10:38 AM, Nava Carmon <email@hidden> wrote:
Hi All,
I have some bundle, that links with a static library. My application loads that bundle and looks for an entry point:
modelEntry = reinterpret_cast<ModelEntryProc>(CFBundleGetFunctionPointerForName(modelBundle,CFSTR("model_call")));
The function model_call is defined and declared in the static library. I tried almost everything to get my application see this symbol, but no success. The question is if it's possible at all? May be I misinterpret the CFBundleGetFunctionPointerForName usage?
In my experience, CFBundleGetFunctionPointerForName wants symbols to be prefixed with an underscore - that is, _model_call. They're stored that way in the binary (it's a C thing) and the function doesn't appear to add it for you before searching.
sherm--
_______________________________________________
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