On Jan 2, 2012, at 7:52 AM, Grandinetti Philip wrote:

> You raise a fundamental issue that I admit I don't completely understand.   
> What are the differences between linking against a static library versus a 
> framework.   If I turned all my static libraries into a framework would the 
> plugin see the static variables in the framework without having to do all the 
> Xcode linking magic?

The difference is copying vs. referencing. A static library gets copied into 
the target at link time, whereas if you link with a dynamic library or 
framework, the linker just notes down what symbols are referenced, and at load 
time those get resolved to those symbols in the library.

For your purposes, the difference is that in a static library, everything that 
links with it has its own private copy of the library's global variables. In a 
dylib/framework, everything that links with it shares its global variables. The 
latter is what you want.

—Jens

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to