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

Re: static libraries


  • Subject: Re: static libraries
  • From: james tittle <email@hidden>
  • Date: Tue, 25 Oct 2005 09:48:25 -0400

On Oct 21, 2005, at 10:42 PM, Steve Checkoway wrote:
On Oct 21, 2005, at 7:01 PM, Andreas Grosam wrote:
Guess, we need to *explicitly* specify
-L<lib-path> -l<name>
tupels in the "Other Linker Flags" build settings in order to ensure that a certain library will be selected.
(the -Wl, syntax is not necessary, though)

If you just pass -L/path/to -lfoo and expect it to give use /path/ to/libfoo.a and there is a dynamic library with the same name elsewhere, it'll get picked up unless you instruct ld otherwise by using -search_paths_first. Since gcc doesn't know about that, you have to use -Wl, to pass it along.

...just thought I'd mention a simple (non-xcode) way around this: just create a folder called "libs" or "staticlibs" and fill it with symbol links ("ln -s /path/to/staticlib.a staticlib.a") to your favorite/needed static libraries...then just include the path to this folder when linking...this makes all the dylib mix up go away :-)


james
_______________________________________________
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: static libraries
      • From: "Peter O'Gorman" <email@hidden>
References: 
 >static libraries (From: Steve Checkoway <email@hidden>)
 >Re: static libraries (From: Andreas Grosam <email@hidden>)
 >Re: static libraries (From: Steve Checkoway <email@hidden>)

  • Prev by Date: Re: Textual project format for XCode
  • Next by Date: Re: static libraries
  • Previous by thread: Re: static libraries
  • Next by thread: Re: static libraries
  • Index(es):
    • Date
    • Thread