• 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: Adding (static) libraries to target
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Adding (static) libraries to target


  • Subject: Re: Adding (static) libraries to target
  • From: Fritz Anderson <email@hidden>
  • Date: Tue, 10 May 2005 14:51:02 -0500

On 10 May 2005, at 2:10 PM, Justin Walker wrote:

I would like to create a static library within the project to contain those files, so that the other programs can consist of one file, plus libraries.

I can create the library in the project and build it, but I cannot seem to persuade Xcode to add this to a target (newly created). I create the new target, successfully add the primary source file and a few other libraries, but when I try to "add existing frameworks...", and navigate to the built library, it is greyed out. I haven't found an alternate way to add the library.

Call a non-library target "the product." Two tasks: Make the library a dependency for the product; and add the library to the product's link phase.


1. Make the product the current target.

2. Open the product's target info (double click the product's icon inside the Targets group) and in the General pane, press the plus button at the bottom of the Direct Dependencies list. Select the library; press Add Target. Now changing the library will force a rebuild of the product.

3. The library appears in a "Products" group in the Groups & Files list just above the Targets group. Drag its icon from there to just below the product's icon in the Targets group, which should expand to show the build phases. Drop the icon into the "Link Binary With Libraries" phase. Now it'll link.

Equivalent to 3: Select the Products group, or the Project icon in the Groups & Files list. In the Detail list that appears in the right- hand part of the window, set the checkbox next to the library.

    -- F



 --
Fritz Anderson
Consulting Programmer
http://resume.manoverboard.org/


_______________________________________________ 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: Adding (static) libraries to target
      • From: Justin Walker <email@hidden>
References: 
 >Adding (static) libraries to target (From: Justin Walker <email@hidden>)

  • Prev by Date: Re: libtool, makefiles, & 10.4?
  • Next by Date: Oracle pro*c makefile makerules in xcode 2 ?
  • Previous by thread: Adding (static) libraries to target
  • Next by thread: Re: Adding (static) libraries to target
  • Index(es):
    • Date
    • Thread