swarm-hackers
[Top][All Lists]
Advanced

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

Re: [swarm-hackers] header directory structure


From: Bill Northcott
Subject: Re: [swarm-hackers] header directory structure
Date: Mon, 7 Jul 2008 17:55:52 +1000

On 07/07/2008, at 5:28 PM, Scott Christley wrote:
Well I don't mean to imply that one way is better than the other, they are just different and I'm just looking for a solution that accommodates both systems, and keeps the end-user source code identical across systems.
This doesn't have anything to do with Xcode, its the framework  
architecture, you would have the same issue with plain Makefiles  
trying to compile against a framework.  My understanding is that the  
compiler does some sort of translation so when you give the flag "- 
framework Swarm", it converts
#import <Swarm/DefObject.h>

into the actual path, something like

#import <Swarm.framework/Headers/DefObject.h>
The '-framework Swarm' is a linker flag that looks for a library:  
Swarm.framework/Swarm.  In practice this is a symlink to the actual  
library in Swarm.framework/Versions/X.X.X/
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.
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.
Bill




reply via email to

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