• 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 a static library, not a dylib
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: linking a static library, not a dylib


  • Subject: Re: linking a static library, not a dylib
  • From: Eric Albert <email@hidden>
  • Date: Tue, 10 Oct 2006 15:06:50 -0700

On Oct 10, 2006, at 2:52 PM, Justin C. Walker wrote:

On Oct 10, 2006, at 14:37 , Os wrote:

How do I tell it to use the static, rather than dynamic, version of a lib?

This should be a FAQ; it has been discussed frequently on this list (and the threads are in the archive).


The short answer is:
  - static libraries are not really supported
  - the linker will always find the .dylib before it finds
    the .a
  - if you have both versions, you have two choices:
    - keep them in different directories and use "-L"
    - specify the .a by full path name without a "-l"

You should check the archive for more detail and discussion.

You can also use the -search_paths_first linker flag. See the ld man page for details.


-Eric

_______________________________________________
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: linking a static library, not a dylib
      • From: "Justin C. Walker" <email@hidden>
References: 
 >linking a static library, not a dylib (From: Os <email@hidden>)
 >Re: linking a static library, not a dylib (From: "Justin C. Walker" <email@hidden>)

  • Prev by Date: Re: Re: linking a static library, not a dylib
  • Next by Date: Re: linking a static library, not a dylib
  • Previous by thread: Re: linking a static library, not a dylib
  • Next by thread: Re: linking a static library, not a dylib
  • Index(es):
    • Date
    • Thread