• 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: Linking static libraries
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Linking static libraries


  • Subject: Re: Linking static libraries
  • From: Rush Manbert <email@hidden>
  • Date: Mon, 06 Mar 2006 11:42:14 -0800

Dieter Oberkofler wrote:
On Mar 3, 2006, at 8:04 PM, Rush Manbert wrote:

Dieter Oberkofler wrote:

I'm dealing with a similar problem and have understood that the only way to go is to add the needed static libraries in the "Other Linker Flags".
- Dieter

The "only way to go" as in it's the only thing that works, or it has the least side effects?


- Rush



I'm myself currently trying to find out. It seems to me as if XCode would at least no longer check the dependencies for those libraries.
- Dieter


If you add a library to a target by selecting the target, then selecting Add Existing Framework, or by dragging and dropping a library onto the project, the path to that specific library file gets added to the Library Search Paths in all build configurations for the target. This may or may not be what you want, because your Debug and Release configurations may require Debug and Release versions of the library.

If you add the library as -lname in the Other Linker Flags, then you are responsible for setting the library search paths correctly. Nothing gets done for you, but nothing unexpected happens that needs to be undone.

As near as I can tell, adding a library to a target by dragging and dropping does not add any dependency behavior, besides possibly a check of file timestamp that might trigger a new link to happen. It doesn't, for instance, trigger a rebuild of the library if it has its own Xcode project. I would guess that adding libraries via the Other Linker Flags carries the drawback that it doesn't add *ANY* dependency behavior. If you change one of the libraries that you link against, the dependent project probably doesn't detect the change.

For me, this is an issue that I need to consider. I am using a number of open source libraries. When I link against one of them, I need per-build-configuration library name, library search path, and header search path. The behavior that Xcode implements makes this rather difficult to manage, so I would like to have configuration files that define the parameters correctly for each library. I would also like to detect if a library changes, so I can relink. I'm not sure how I'm going to manage adding the lib parameters via config file AND getting proper dependency behavior.

- Rush
_______________________________________________
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: 
 >Linking static libraries (From: Andrew Taylor <email@hidden>)
 >Re: Linking static libraries (From: Rush Manbert <email@hidden>)
 >Re: Linking static libraries (From: Dieter Oberkofler <email@hidden>)
 >Re: Linking static libraries (From: Rush Manbert <email@hidden>)
 >Re: Linking static libraries (From: Dieter Oberkofler <email@hidden>)

  • Prev by Date: Re: Universal Shared libraries
  • Next by Date: Monaco being displayed incorrectly?
  • Previous by thread: Re: Linking static libraries
  • Next by thread: Editor Usage Question
  • Index(es):
    • Date
    • Thread