On 6/19/07, Michael Baker <mike@objectivedynamics.co.uk> wrote:
> I've posted this question to eclipse.tools.cdt but I've also posted it here
> because response here is so much quicker and very helpful.
>
> I'm currently developing code for a system which must be portable across
> both Windows and Linux.
>
> I am looking for a way to set up my project such that I only have to
> maintain a single set of source files but that I am able to build the
> project on both Windows and Linux.
>
> I can't get it to work with a single project (see original post at the
> bottom of this message). I can get it to work with separate projects for
> Windows and Linux as follows:
>
> linux_project
> .cproject
> .project
> windows_project
> .cproject
> .project
> src
> file1.h
> file1.cpp
>
> Now, in order to get the above to work, I needed to specify src as a linked
> folder in the settings for each project. The problem with this is that when
> I use SubClipse to import either project into Subversion, it doesn't import
> file1.h and file1.cpp.
>
> Is anyone else here doing cross platform development with Eclipse or can
> anyone point me in the direction of any documentation which would show how
> to do it ?
It seems like a flaw in the design of CDT if these project files
cannot be shared across platforms. Anyway, you can do what you want
using Subclipse and Subversion. I would recommend using svn:externals
feature. Check out one of the projects, lets say the Windows_project
as an example. When you first check it out, it will be empty because
all it contains are the Eclipse project files. Right click on the
project and do Team -> Set Property. Choose svn:externals for the
property and enter this for the value:
src url://host/repos/path/to/src
Then click OK and do Team -> Update. This will pull in and create the
src folder. Now just commit the property change. Future checkouts
will do this in one step.
If one platform is more predominant than the other, then I would
suggest just locating the src folder underneath that project so that
it can just do a "normal" checkout. Then use svn:externals on the
other project to pull in the src folder.
--
Thanks
Mark Phippard
http://markphip.blogspot.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subclipse.tigris.org
For additional commands, e-mail: users-help@subclipse.tigris.org
Received on Tue Jun 19 17:25:32 2007