• 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: Debug/Release Library Matching
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Debug/Release Library Matching


  • Subject: Re: Debug/Release Library Matching
  • From: David Spells <email@hidden>
  • Date: Sun, 4 Sep 2005 01:23:41 -0500

What about Frameworks and bundles?

I want code to copy in the debug Framework into my debug application, and the release Framework into my release application.
Don't I have to use the copy files build phase to do this? The copy files build phase seems to be target dependent.


- David

On Sep 4, 2005, at 1:19 AM, Chris Espinosa wrote:

On Sep 3, 2005, at 11:06 PM, Ben Weiss wrote:


I'm porting an application from Codewarrior, which incorporates a static library that comes in both debug and release flavors (mylib_d.a, and mylib.a). How can I add these files to the respective debug and release build configurations in my project, such that the debug configuration links to mylib_d.a, and the release configuration links to mylib.a?

XCode only seems to want to add the libraries to both configurations at once (or neither), but obviously I need to match up debug to debug and release to release. Any suggestions?


The best way to do this is to use a shared build folder between the project that builds the static library and the project that builds its clients. Both projects should have Debug and Release configurations (the names are arbitrary, but should be the same in each project).


When you build the static library's Debug configuration, it will build into $(SYMROOT)/Debug/mylib.a, and when you build Release, it will build into $(SYMROOT)/Release/mylib.a. Note that the library names are the same but they're in per-configuration directories, much like CodeWarior puts per-target intermediates into per-target directories.

Then drag the static library project and drop it into your app project. When you disclose it, it will show that it builds foo.a. Drag that into the Link Binaries with Libraries build phase of your target.

Then when you build the Debug configuration of your app, it will use the Debug build folder, and automatically pick up the Debug static library, and the same for the Release configuration.

If you really want the files in the same place and named differently, then you have to use separate targets for your Debug and Release versions of your app (and probably use just one configuration). Add the mylib_d.a static library to the Debug target and the mylib.a static library to the Release target, just like in CodeWarrior.

Chris

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40macromedia.com


This email sent to email@hidden


_______________________________________________ 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: Debug/Release Library Matching
      • From: Chris Espinosa <email@hidden>
References: 
 >Debug/Release Library Matching (From: Ben Weiss <email@hidden>)
 >Re: Debug/Release Library Matching (From: Chris Espinosa <email@hidden>)

  • Prev by Date: Re: Debug/Release Library Matching
  • Next by Date: Re: Debug/Release Library Matching
  • Previous by thread: Re: Debug/Release Library Matching
  • Next by thread: Re: Debug/Release Library Matching
  • Index(es):
    • Date
    • Thread