• 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: Manually link framework
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Manually link framework


  • Subject: Re: Manually link framework
  • From: Chris Espinosa <email@hidden>
  • Date: Fri, 6 Jan 2006 11:08:13 -0800

On Jan 6, 2006, at 10:47 AM, Greg Norz wrote:

I want to link in different versions of a framework based on a project's configuration. Is the best way to do this via the "Other Linker Flags" setting? If so, what's the syntax for linking in a framework? All I've found is "-weak_framework" but I'm not 100% convinced that this is the method I should be using.
 
A bit of a description : I have a 3rd party framework, one Debug and one Release. In my own Debug project, I'd like to link against "3rdParty_debug.framework", and in Release link against "3rdParty.framework". I would then just modify the search paths for each Configuration to look in the appropriate 3rd party directory.

Yes, if you don't want Xcode's automatic link-the-framework-that's-included-in-the-target behavior, here's what you do:

1) Remove the framework from your target.  You can do this just by Get Info on the framework, going to the Targets tab, and unchecking that target.

2) Add to your target's Framework Search Paths build setting the path to the correct framework for each configuration.  If the headers for the Debug and Release frameworks are the same, you don't need to do this; if they're different, you probably need to make sure the frameworks are in separate Build and Release directories, and have different paths to them in your different configurations.

3) Add to your target's Other Linker Flags an entry like "-framework 3rdParty_debug"  to each configuration, using the correct full path to the framework for that configuration.  If you have other Other Linker Flags defined at the project level, you need to make sure you use $(VALUE) as well, to inherit the flags provided at that level.

Chris
 _______________________________________________
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

References: 
 >Manually link framework (From: "Greg Norz" <email@hidden>)

  • Prev by Date: Manually link framework
  • Next by Date: Avoiding destructors while still calling atexit handlers
  • Previous by thread: Manually link framework
  • Next by thread: Avoiding destructors while still calling atexit handlers
  • Index(es):
    • Date
    • Thread