Re: Organizing .h and .m files.
Re: Organizing .h and .m files.
- Subject: Re: Organizing .h and .m files.
- From: Greg Guerin <email@hidden>
- Date: Fri, 5 Oct 2007 13:18:30 -0700
Nelson Santos wrote:
>Yeah, I know. But I didn't want to add a whole library if I only
>wanted one of the classes included in my app.
If you create your static library from multiple translation units, then
when you link to it, only the units you actually use will be pulled into
your executable. Static libs aren't necessarily monolithic all-or-none
constructions. A typical static lib is an "archive" of separately linkable
object-files, usually arranged in dependency order for single-pass symbol
resolving.
>Well, I don't quite agree with this. Both static and dynamic
>libraries can be declared as dependencies thus causing my app to
>obtain the latest version of the libraries when I build.
"Latest version when built" is one thing, and dylib or static lib will both
do that.
"Latest version when executed" is another, and only a form of dylib can do
that.
If you link against a dylib, the dylib can be updated separately from any
executables that linked against it (assuming API compatibility). I thought
that's what you wanted by being able to always have the latest version. A
static lib, however, is copied in as an actual part of your linked
executable, rather than simply being referenced by it as a dylib is.
-- GG
_______________________________________________
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