Re: Question about dynamic and static libraries
Re: Question about dynamic and static libraries
- Subject: Re: Question about dynamic and static libraries
- From: Ladd Van Tol <email@hidden>
- Date: Wed, 28 Dec 2005 17:28:31 -0800
Yes, this works, and I generally do this in a shell script phase.
Still, it's an annoyance to have to set this up every time.
- Ladd
On Dec 28, 2005, at 5:07 PM, David Young wrote:
Maybe I'm missing something, but can't you just rename your static
library to something that doesn't collide with one of the system
dynamic libraries?
e.g. "libcurl.a" -> "libcurl6.29.101.a"
... then drop the latter into the Xcode project?
I know I've done something like that before without too much
headache. Maybe you need -Wl,search_paths_first or something as
well, can't remember.
--dave
On Dec 28, 2005, at 4:42 PM, Ladd Van Tol wrote:
On Dec 28, 2005, at 4:00 PM, Steve Checkoway wrote:
I have to disagree with you. If I drag a static library into
Xcode, I want _that_ library to be used and I usually have a very
good reason for it. When Xcode passes libraries to the gcc I
don't want symlinks resolved for dynamic libraries and I want
absolute or relative (my choice!) paths passed for static libraries.
What I don't want is for Xcode to decide that maybe I really
meant to use -lfoo when I dragged /Users/me/some_project/libfoo.a
into the window, especially if libfoo.dylib exists in /usr/lib.
I couldn't agree more. In fact, I asked why we couldn't force
static linkage on a per-library basis a few WWDCs back. I then
filed a bug in July of 2004 (3716243). Apparently Apple doesn't
see this as a problem, because they can control the dylibs that
ship with the system. Meanwhile, developers who wish to statically
link a newer version of a library shipped by Apple (such as curl,
zlib, or libxml) have to pull their hair out dealing with search
paths, or moving aside dylibs. There are well-justified reasons
for using static libs in some circumstances -- Apple should
support those of us who need them.
- Ladd
_______________________________________________
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
_______________________________________________
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