From: Fonarix on
Hi to all,

Is it possible to include Cocoa.framework to static lib and use there
only,
because when I use this static lib in my application, I have a lot of
error for NSs:

"_objc_msgSend", referenced from:
....
"_NSApp", referenced from:
_NSApp$non_lazy_ptr in libMyLib.a(CMyLib.MacOS.o)
"_NSDefaultRunLoopMode", referenced from:
_NSDefaultRunLoopMode$non_lazy_ptr in libMyLib.a(CMyLib.MacOS.o)
ld: symbol(s) not found

The problem can be resolved, if Cocoa.framework will be included into
App project, but I do not want to do this, because of a lot of
projects I have.

On some forums I read, that it is not possible to link any frameworks
to static libs. And also I found, this library compiles well without
any framework, it is enought "#import <Cocoa/Cocoa.h>" directive to
compile it.

Thanks, for any suggestions.

From: Steven Fisher on
In article
<9a89dffe-52db-4c65-8aba-73ab0bade72b(a)w12g2000yqj.googlegroups.com>,
Fonarix <fonarix(a)ukr.net> wrote:

> Is it possible to include Cocoa.framework to static lib and use there
> only,

No.

> The problem can be resolved, if Cocoa.framework will be included into
> App project, but I do not want to do this, because of a lot of
> projects I have.

Including a framework reference in your project does not mean that a
copy of the framework is included in your app, only that it uses the
framework at runtime.

This is a pretty basic concept. You really should work through some of
Apple's getting started documents, templates, etc. to see how this works.


Steve
From: Steven Fisher on
In article <sdfisher-FC9FFF.19432815072010(a)shawnews.vc.shawcable.net>,
Steven Fisher <sdfisher(a)spamcop.net> wrote:

> In article
> <9a89dffe-52db-4c65-8aba-73ab0bade72b(a)w12g2000yqj.googlegroups.com>,
> Fonarix <fonarix(a)ukr.net> wrote:
>
> > Is it possible to include Cocoa.framework to static lib and use there
> > only,
>
> No.
>
> > The problem can be resolved, if Cocoa.framework will be included into
> > App project, but I do not want to do this, because of a lot of
> > projects I have.
>
> Including a framework reference in your project does not mean that a
> copy of the framework is included in your app, only that it uses the
> framework at runtime.
>
> This is a pretty basic concept. You really should work through some of
> Apple's getting started documents, templates, etc. to see how this works.

I suppose I should add: I don't say this to be rude, only that if you're
missing this you're probably missing a lot of other important things. :)


Steve
From: Fonarix on
On 16 Лип, 05:44, Steven Fisher <sdfis...(a)spamcop.net> wrote:
> In article <sdfisher-FC9FFF.19432815072...(a)shawnews.vc.shawcable.net>,
>  Steven Fisher <sdfis...(a)spamcop.net> wrote:
>
>
>
> > In article
> > <9a89dffe-52db-4c65-8aba-73ab0bade...(a)w12g2000yqj.googlegroups.com>,
> >  Fonarix <fona...(a)ukr.net> wrote:
>
> > > Is it possible to include Cocoa.framework to static lib and use there
> > > only,
>
> > No.
>
> > > The problem can be resolved, if Cocoa.framework will be included into
> > > App project, but I do not want to do this, because of a lot of
> > > projects I have.
>
> > Including a framework reference in your project does not mean that a
> > copy of the framework is included in your app, only that it uses the
> > framework at runtime.
>
> > This is a pretty basic concept. You really should work through some of
> > Apple's getting started documents, templates, etc. to see how this works.
>
> I suppose I should add: I don't say this to be rude, only that if you're
> missing this you're probably missing a lot of other important things. :)
>
> Steve

Thanks a lot, for your answer!
Cheers.