On Jan 2, 2012, at 6:27 PM, Grandinetti Philip wrote:

> But I'm troubled by this solution.   If I set debugger break points in the 
> "Units" library the debugger no longer stops at those breakpoints when called 
> by the plugin, but it does stop at those breakpoints when called by the main 
> app.   Makes me think I have two copies of code for my static units library 
> running after the plugin is loaded.   Does that make sense?

Yes. That’s what a static library is. As I said, it gets *copied* into the 
binary at link time. So you do have two copies of the code for the units 
library. If you only want one copy of the code, make a dynamic library instead 
(or a framework, which is just a dynamic library packaged with header files and 
resources.)

If you make Units a dynamic library, you won’t have to mess with 
CFBundleGetDataPointerForName either. Just make sure ‘unitsLibrary’ gets 
exported from Units, and declare it extern in the code that wants to use it.

—Jens

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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