Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
20 years ago

Nios II IDE Projects

Hi everyone

Can anyone help me with what seems like a basic question?

How do I use source files in a NiosII project when they are not actually stored in the project directory? For example my main project is located in:

C:\Projects\MyProject and C:\Projects\MyProject_syslib

But I have another directory:

C:\Projects\MyCommonStuff

in which I want to store common source files used on several different nois projects.

I have two problems:

1. How do I tell the IDE where to find header files e.g.# include <MyCommonFile.h>.

I tried adding the path to the project&#39;s "Include Paths" but it still says "no such file".

2. How do I tell the IDE I want to add files from my common files folder? I really don&#39;t want to have to copy the actual files into project directory since I only want to add improvements to a single file and then just re-compile all projects that reference them.

1 Reply

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    That&#39;s called a "Managed Library" (it&#39;s one of the choices for when you create a project). It will create all the necessary files for bringing it into your application project. First you create the managed library and compile it (release or debug mode). Then in your application project you have to specify the: Library name, the library archive (.a file) search path, and the library include path (note this is all from memory and unfortunately I&#39;m not at a machine that I can confirm this with). But in short the managed library has the source code you want to put in a common folder, and your application includes it (using the managed library and the common include files)

    I hope that gets you started at least, and that someone else can give better instructions.