• 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
RE: Xcode and external bundles
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Xcode and external bundles


  • Subject: RE: Xcode and external bundles
  • From: "Matt Weiss" <email@hidden>
  • Date: Thu, 6 Jul 2006 07:43:48 -0400
  • Thread-topic: Xcode and external bundles

Nick,

Thanks for the reply.

I have about 7 bundles.  Do I need to explicitly load all of my bundles
individually with CFBundle or NSBundle?  Is there a way that I can
discover which ones I need to load?  I have next to no documentation
with this SDK :(

Thanks,
Matt

-----Original Message-----
From: Nick Zitzmann [mailto:email@hidden]
Sent: Wednesday, July 05, 2006 6:34 PM
To: Matt Weiss
Cc: email@hidden
Subject: Re: Xcode and external bundles


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

  • Follow-Ups:
    • Re: Xcode and external bundles
      • From: Nick Zitzmann <email@hidden>
  • Prev by Date: [ANN] Xcode + Leopard at WWDC this year
  • Next by Date: How to copy correct framework for build configuration?
  • Previous by thread: Re: Xcode and external bundles
  • Next by thread: Re: Xcode and external bundles
  • Index(es):
    • Date
    • Thread