Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12745 Discussions

How do you share files in an Eclipse projects?

Altera_Forum
Honored Contributor II
2,835 Views

I'm starting a second project based on my first NIOS II project. All but 3 of the source files are the same. I want to create a Common_Source folder for the common files and share this with 2 or more projects. I know I can create a library, but these files depend on system.h which prevents this from working. I want to build these with each project's settings. 

 

Short of putting C files in the project with# include "../Common_Source/filename.c", is there a better way? 

 

Thank you! 

Bill A.
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
1,742 Views

solution: 

 

For each project that needs the shared folder of files: 

 

1. Open properties for the project. 

2. Select c/c++ project paths

3. Click add folder... 

4. Click create new folder... 

5. Click advanced >> 

6. Check link to folder in the file system 

7. Click browse... or enter the folder name 

8. Click ok 

9. Click ok 

10. Click ok 

 

All of the files in this folder (and sub folders) will be compiled into the project as if they were located in the project's base folder.
0 Kudos
Reply