Sharing source files between projects

Topics for the Eclipse Environment
Post Reply
sulliwk06
Posts: 118
Joined: Tue Sep 17, 2013 7:14 am

Sharing source files between projects

Post 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.
dpursell
Posts: 20
Joined: Thu Aug 05, 2010 3:15 pm

Re: Sharing source files between projects

Post 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
User avatar
Forrest
Posts: 283
Joined: Wed Apr 23, 2008 10:05 am

Re: Sharing source files between projects

Post 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.
Forrest Stanley
Project Engineer
NetBurner, Inc

NetBurner Learn Articles: http://www.netburner.com/learn
sulliwk06
Posts: 118
Joined: Tue Sep 17, 2013 7:14 am

Re: Sharing source files between projects

Post by sulliwk06 »

This works for me, thank you.
Post Reply