Page 1 of 1

Sharing source files between projects

Posted: Tue Jun 24, 2014 11:58 am
by sulliwk06
I have several source files that I am trying to share between multiple projects. Some of them are platform dependent so I can't make a library unless I make multiple libraries and rebuild them for each platform every time I make a change. I would think there should be an easy way to reference external source files in eclipse, but I can't find it.

Any ideas? or should I just suck it up and use a library for each platform.

Re: Sharing source files between projects

Posted: Tue Jun 24, 2014 6:05 pm
by dpursell
In v2.6.3, this works for me to link to an external file:

1. Right click on the project or folder you want the file in
2. Select New -> Other -> General -> File and hit next
3. Expand the "Advanced >>" pane
4. Select "Link to file in the file system" and use "Browse..." to select your file, then click Finish

I tend to have a set of "master" libraries for my main platform, then use this technique to create additional libraries from the same source when I need them on other platforms

Re: Sharing source files between projects

Posted: Thu Jun 26, 2014 10:31 am
by Forrest
dpursell wrote:In v2.6.3, this works for me to link to an external file:

1. Right click on the project or folder you want the file in
2. Select New -> Other -> General -> File and hit next
3. Expand the "Advanced >>" pane
4. Select "Link to file in the file system" and use "Browse..." to select your file, then click Finish
I've used this method in th past for source files and headers.. Keep in mind that you cannot share the html directory though.

Re: Sharing source files between projects

Posted: Thu Jun 26, 2014 10:34 am
by sulliwk06
This works for me, thank you.