Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to load my framework programatically ?



Hi Rohit,

Thanks for your reply. Also, it would be great if you could clarify/ suggest below concerns too

1. We no longer need to link the framework explicitly, i.e. gcc myuseApp.c -framework myFramework.framework. Is that correct ?

If you want to use functions or classes from that framework, you need to link to it (with -framework).


2. Also,if I just specify the header file and use the function I require from framework, then will the "initialize routines" and "terminate routine" of the framework be called automatically.

I'm not sure what you mean here; can you give an example of an initialize/terminate routine?


Actually we have routine(s) that get called up when the framework gets loaded and unloaded respectively.

I don't think of the framework as getting "loaded"; rather it's a pile of code that your program can use if it wants. In Mac OS X, code is never unloaded; once it's loaded, it's there to stay until the program exits.


I'm not completely confident in this answer though; someone else will be better able to answer. There are exceptions too, such as classes in a loaded framework being all send the +load message.


Jonathon Mah 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: http://lists.apple.com/mailman/options/xcode-users/email@hidden

This email sent to email@hidden
References: 
 >How to load my framework programatically ? (From: "rohit dhamija" <email@hidden>)
 >Re: How to load my framework programatically ? (From: Jonathon Mah <email@hidden>)
 >Re: How to load my framework programatically ? (From: "rohit dhamija" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.