Organizing .h and .m files.
Organizing .h and .m files.
- Subject: Organizing .h and .m files.
- From: Nelson Santos <email@hidden>
- Date: Fri, 5 Oct 2007 10:06:44 -0400
Hi all.
When writing Cocoa applications, I may create some classes that are
not application specific. Classes that I would probably like to use
in other future Cocoa projects. What would be the best technique to
organize those .h and .m files? Here are my requirements:
a) I only want a single copy of each .h and .m file to exist
anywhere, ever.
b) I want them statically linked to the projects that use them (i.e.
no additional files required on client machines.)
c) I want to easily define which headers/implementation files I want
to use for each project.
So, based on the above requirements, public frameworks, dynamic
libraries and embedded frameworks are out. So, what are my other
options? A static lib for each .h/.m combo? That seems like a lot
of work for something seemingly simple. Plus, I'd have to create a
project dependency for each project to make sure I compile the latest
code to have the most up-to-date library.
Ideally, I'd like it to be as easy as an #import <myheader.h>, but
this won't import the implementation files. Do I have to locate and
drag the .m files into the project and #import the header for each
project that needs 'em? Is there a way to make the compiler locate
the associated .m file automatically? I tried setting the header and
library search paths to point to the .h and .m folders. That didn't
work (I knew it wouldn't.)
Any ideas?
Thanks.
Nelson Santos
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden