Showing results for 
Search instead for 
Did you mean: 
New Contributor I

Adding project root directory to include paths does not work

I was trying to add project root directory to include search path in Project > Properties > Nios II Application Paths > Application include directories.

(This is needed in case Project/somedir/file.c needs to include Project/file.h using #include "file.h" instead of #include "../file.h")

When I select current project it is converted to relative path and added as "./", which adds "-I./" switch to compilation command.

This breaks compilation because gcc does accept "-I./" - the correct syntax should be "-I." without slash.

The issue can be solved by manually removing the slash in APP_INCLUDE_DIRS in the Makefile.

IMO,  looks like EDS bug.

Tags (4)
0 Kudos
2 Replies

Hi @jackhab,

Thank you for posting in Intel community forum, hope this message find you well.
Much appreciated your help in pointing this out to us, we would surely look into this and apologies for the inconvenient faced.
Further clarification on the situation, do you mind to share with us what quartus version that you faced the problem in? And after adding the 'Application include directories', I presume that the Application library directories and Library name are also being added yes? If possible, it would be a great help to get a screenshot of the paths added from your end to investigate further.

Warm regards.

New Contributor I

Hi @BoonBengT_Intel 

I'm using Quartus 18.1 on Windows.

Application library directories and Library name are not added since the issue I'm describing is not related to library (I'm not using libraries at all, except, of course the BSP) rather than compiling C sources inside the same NIOS application project.

In the attached screenshots you can see I added top-level application project directory (called Nios) to include search paths.

Despite "-I./" being passed to gcc the file Nios/Drivers/gps.c cannot include Nios/logger.h.

As I said above, manually changing APP_INCLUDE_DIRS from "./" to "." in the Makefile fixes the compilation.