Re: static to override dylib
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