Subject: Re: How to share Cocoa classes?

2009-07-06 Thread Alexander Bokovikov

Thank you, Jesse, but just a couple of points to clarify:


Static library linking with ObjC class, most likely could be done

successfully by only adding -ObjC and -all_load to the Other Linker
Flags in the build configuration.

Is this option applicable to library project settings or to a project where 
this library is called from?



To be able to use

#import MyDir/MyClass.h,
you need to add a header search path, that refers to that global
directory (or system directory, if you prefer) in your project
settings.

Could you please give an example of particular directories, where I could 
put headers as well as the library? All directories at root level are 
write-protected. What is the correct location to put my own libraries?


Also what particular settings are responsible for headers (and libraries) 
search path?


Thank you!

___

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


Re: Subject: Re: How to share Cocoa classes?

2009-07-06 Thread Jesse Armand

 Is this option applicable to library project settings or to a project where
 this library is called from?


Since the linking is done on the project that's including the library,
so this should be done on the project that's using the library.


 Could you please give an example of particular directories, where I could
 put headers as well as the library? All directories at root level are
 write-protected. What is the correct location to put my own libraries?

 Also what particular settings are responsible for headers (and libraries)
 search path?

If you want to put it in /Developer/SDKs/MacOSX10.5.sdk/usr/lib/ you
need to use the user with administrator privileges, just like when you
install the Xcode and its SDK.

If you put it there, the headers should be in
/Developer/SDKs/MacOSX10.5.sdk/usr/include/

But, I usually just put my own projects in my own folders, not system
folder, unless if I want to release that library into the public, as a
part of the Mac OS X SDK, which is unlikely.

When you do the latter, just add a header path corresponding to your
own folder, like:

/Projects/MyLibrary/Headers

Libraries should be added to the project, not searched.
___

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