Re: Xcode and external bundles
Re: Xcode and external bundles
- Subject: Re: Xcode and external bundles
- From: Nick Zitzmann <email@hidden>
- Date: Wed, 5 Jul 2006 16:34:02 -0600
On Jul 5, 2006, at 2:05 PM, Matt Weiss wrote:
I have an SDK that I'm trying to link into an application. My
application that I'm trying to make is a dylib.
Then it's not an application; it's a dynamic library.
1) Do I need these PEF executable files if I have the .bundles? Are
they necessary?
They probably are if they're there. Perhaps the SDK launches these
executables.
2) Where in the project do I include the bundles and/or the .PEF files
so that Xcode links against them? Do I need to write code to
explicitly
load these bundles?
You don't link against bundles; your code has to dynamically load
them using CFBundle or NSBundle. In order to get around the linker
errors, you need to tell the linker to ignore the undefined symbols.
You can do that by either using the -u linker flag for each undefined
symbol, which will also force you to tell the linker to flatten the
namespace, or you can use CFBundleGetFunctionPointerForName() as
described in the CoreFoundation documentation.
3) I found an article that proposed that this may not be possible:
http://lists.apple.com/archives/Xcode-users/2004/Sep/msg00343.html
Is this accurate? Does this apply to the .dylib that I am
trying to
make?
On PPC you should be able to load PEF bundles from Mach-O code using
CFBundle or NSBundle. I don't think that will work on Intel, though.
You just can't link Mach-O code to PEF/CFM code.
4) My SDK is PPC only. Can I build a dylib with this SDK that will
run
in Rosetta on a Mac-Intel?
Intel binaries can't be linked against PPC binaries, so it'll have to
run under Rosetta.
Nick Zitzmann
<http://seiryu.home.comcast.net/>
S/MIME signature available upon request
_______________________________________________
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