Re: Linker refuses to link my dylib? Why?
Re: Linker refuses to link my dylib? Why?
- Subject: Re: Linker refuses to link my dylib? Why?
- From: Brad Oliver <email@hidden>
- Date: Thu, 15 Feb 2007 13:53:25 -0700
On Feb 15, 2007, at 1:14 PM, email@hidden wrote:
In other words, I'd strongly suggest that you not ship libraries
built non-PIC.
Just to clarify, this is in reference to dynamic libraries and/or
libraries that you are distributing to other developers, right?
We do use static libraries a lot in our projects as intermediate
build steps, and of course they work fine with non-PIC, but they are
just that - intermediates.
A side note about an Xcode bug: if you have a project that builds a
bunch of static libraries and then your main target links to those
libraries, Xcode will fail to link properly in one situation:
If you make a change to source in one of those static libraries but
no changes to your main target, then go to link your app, Xcode will
properly compile the intermediate static library, but will fail to
notice it has been updated when it comes time to link your main app.
The end result is that your app will link to an older version of that
static library. This frequently leads to bouts of "crap, I changed
that code and it didn't do a thing! What's going on?", usually in a
Matt Kennedy Gould voice.
To work around this, we've found that we generally have to "touch" a
file in the main app if we're making code changes that only affect
one of our intermediate static libraries. Most of our apps that
exhibit this are large, so I haven't spent time trying to narrow it
down to see if it's a particular build setting - problem is, a lot of
our build options are necessary simply due to the size of the
codebases we work with.
--
Brad Oliver
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