Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Loading C++ libraries via CFBundle
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Loading C++ libraries via CFBundle



Well, if Palm's library is CFM, it's most likely been produced with CodeWarrior, which is not ABI compatible with GCC. The ABI must be compatible or C++ things like RTI and exceptions won't work, which renders most C++ libraries useless. So even if you were able to grab the library's function pointers, I don't believe you would be able to use them.

-EJ

On Thursday, December 5, 2002, at 12:31 AM, Chris Ridd wrote:

On 2/12/02 6:06 pm, Chris Ridd <email@hidden> wrote:
Hi,

I've got a Mach-O binary (a Palm conduit) being called by a CFM host app
(Palm's HotSync Manager), and my binary is dynamically loading a CFM library
(Palm's HotSyncLib.PPC) using Core Foundation (CFBundle.)

(I'm being cheap - I don't want to buy Codewarrior just to write some
software I'm going to give away.)

I believe there are C++ objects in the CFM library, and I'd *imagine* (not
being a C++ expert) there are magic entry points in the library to
initialize any C++ runtime/construct any static objects. In fact if I use
/Developer/Applications/PEFViewer to disassemble the untitled code section
in the lib, the first (unnamed) chunk of code appears to do just this.

Does CFBundleLoadExecutable() run this initialization code for me? If not,
how would I run it, given that there's no symbol associated with the code
and it would seem therefore that I can't use
CFBundleGetFunctionPointerForName()?

Thanks in advance!

Anyone? (In a slightly plaintive voice!)

Cheers,

Chris
_______________________________________________
carbon-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/carbon-development
Do not post admin requests to the list. They will be ignored.
_______________________________________________
carbon-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/carbon-development
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Loading C++ libraries via CFBundle (From: Chris Ridd <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.