• 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 to override dylib
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: static to override dylib


  • Subject: Re: static to override dylib
  • From: email@hidden
  • Date: Wed, 16 Jul 2008 21:09:04 -0400 (EDT)

Just thinking out loud... Wouldn't it make sense that if you explicitly include libxyz.a that this would tell the linker that you do not want to link against libxyz.dylib? This would sure simplify things and save a lot of headaches.

This is in fact the recommended solution. Given -lxyz, the linker will always prefer libxyz.dylib to libxyz.a in the same directory. You override this by providing an explicit full path to /usr/lib/libxyz.a, which you can do in Other Linker Flags in Xcode.

I am unable to produce this linking behavior using the _recommended_ approach:

After more fiddling, it turns out that adding the libiconv.a in the UI was the culprit, doing so resulted a link command like

...    /path/to/libiconv.a  ...  -liconv

which results the entire dylib search. Removing the file
from "Files & Groups" removed the corresponding "-liconv"
that xcode auto appended.

I hope this discovery will save someone a few hours in the future


BTW, is there a Place where all the XCode build settings, the way how they interact with each other are documented?

Jake

_______________________________________________
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 to override dylib
      • From: Philip Aker <email@hidden>
References: 
 >static to override dylib (From: Jake <email@hidden>)
 >Re: static to override dylib (From: Peter O'Gorman <email@hidden>)
 >Re: static to override dylib (From: "R.L. Grigg" <email@hidden>)
 >Re: static to override dylib (From: Chris Espinosa <email@hidden>)
 >Re: static to override dylib (From: email@hidden)

  • Prev by Date: Re: IBPlugin cannot load
  • Next by Date: Re: IBPlugin cannot load
  • Previous by thread: Re: static to override dylib
  • Next by thread: Re: static to override dylib
  • Index(es):
    • Date
    • Thread