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 Jonathon,
 
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 ?
 
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.
 
Actually we have  routine(s) that get called up when the framework gets loaded and unloaded respectively.
 
If not, then we need to also call those routines explicitly from our application.
 
Please comment.
Regards,
Rohit

 
On 5/25/06, Jonathon Mah <email@hidden> wrote:
Hi Rohit,

On 2006-05-25, at 16:37, rohit dhamija wrote:

> As now of now, i load my framework using
>
>  "gcc myUserApplication.c  -F. -framework myFramework.framework"
>
> Can I load my framework inside my userapplication code ?
>
> ///////////////////////////////////////
> example: myUserApp.c
> int main(){
> printf("Hello APPLE!!!");
> [ LoadMyFramework] =====>contains function func()
> // now since i loaded my framework, i use this function
> func();
> return 0;
> }

You don't need to load anything; just #include the header file from
your framework and call the function. Specifying -framework will make
it all link together.


Jonathon Mah
email@hidden





--
Rohit Dhamija(M) 9818446545
 _______________________________________________
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>)



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.