Re: Relative paths for headers
Re: Relative paths for headers
- Subject: Re: Relative paths for headers
- From: Rush Manbert <email@hidden>
- Date: Wed, 04 Jan 2006 10:03:03 -0800
Marshall Clow wrote:
At 9:36 AM -0800 1/4/06, Chris Espinosa wrote:
On Jan 4, 2006, at 9:23 AM, Greg Norz wrote:
with the "boost" directory and it's files inside. In order to do this in
Xcode, from where does the project setting "User Header Search Paths"
start? From the location of the .xcodeproj file? From the location of
the individual source files that need a particular include?
If relative paths don't work in Xcode, what are some other developers
using when they share projects across multiple machines that might house
code in different locations on disk?
In general it's unwise to rely on "unrooted" relative paths in UNIX,
that is, to trust in a particular setting of the current working
directory.
The two ways to deal with this are to use built-in build settings or
source trees.
Your project wrapper is in the directory pointed to by $(SRCROOT), so
a proper path would be $(SRCROOT)/../../common/include, for example.
The better way would be to define BOOST in your per-user Source Trees
Xcode preference pane to point to Boost on your disk, and have
everybody in the project team do the same. Boost need not be in the
same place on each machine. Then add a user header search path to
$(BOOST)/common/include and then the project will find the right
headers on any machine that has BOOST defined to point to the correct
Boost installation.
The only problem with that (and that is what I do), is that it makes
"clean builds" harder to do - there is setup that must be done before
you can build your project on a new machine. (No more just "p4 sync;
xocdebuild foo"
I am doing the same thing for include and library paths. While it works
well, I'm worried about how others will set up their build environments.
It's arduous to edit the Source Trees paths, and I was wondering if
there is any way to export the settings so that they can be copied to a
new machine. It would be good enough to have a basic set of trees, then
tweak them on the target machine if the directory structure is different.
Anybody have any ideas or pointers?
- Rush
_______________________________________________
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