[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [swarm-hackers] header directory structure

From: Scott Christley
Subject: Re: [swarm-hackers] header directory structure
Date: Mon, 07 Jul 2008 10:25:29 -0700

On Jul 7, 2008, at 12:55 AM, Bill Northcott wrote:

There are two benefits with the framework system, one is the packaging, the second is the versioning system. So multiple versions can be installed. Static linking is always to the current version, but runtime linking uses the original (older) versions.

I will add a third benefit, localized resource files. This is used in another project I work on, BioCocoa, where nucleotide to amino acid translation tables are saved in files. It's easy for the framework to access the file without playing the "where did the file get installed" game.

The behaviour Scott is describing for the headers comes from using '- F Swarm' preprocessor flag. If you are using a makefile you can just ignore this and use '-I /Library/Swarm.framework/Headers' which will work without needing the <Swarm/defobj.h> form. You can do this by using script steps in Xcode to run a standard makefile build. That is what I have always done. The <Swarm/defobj.h> form is only needed if you uses the Xcode build system (jam ?) and tell it to use the framework.

True but then why use the framework architecture only to circumvent it. If I'm gonna go through the effort to build a framework, I want end-users to use it just like any other framework and not have to do any special.

So I think the best option then comes down to keeping the GNU/Linux directory structure and moving it one level down into a Swarm directory, then add a -I flag to Makefile.appl so that existing code works without changes. They can use the <Swarm/defobj.h> format if they want, but they are not required to change their source code. Mac apps will have to use the <Swarm/defobj.h> format.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]