Forum Discussion

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

NIOS II BSP: Problem building the project; No such file or directory

Hi all,

I am trying to build a project. I manually added all the required files(copied) to the project after starting that project. But after every "Build Project" operation it is reporting: xyz.h: no such file or directory.

Please note that I personally added xyz.h file in the project and it is also visible in the Project Explorer.

Please note that I accepted everything default while starting this project. Added .sopcinfo and started project.

What possibly may have gone wrong. I read many similar posts, but the solution provided in then is not working for me.

Best warm regards and Thanks

Tahir

6 Replies

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

    hello TAHIRSENGINE.

    how do you write the code?

    if you include the file with angle bracket.

    # include <xyz.h>

    you should change it with double quotation.

    # include "xyz.h"
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    hello TAHIRSENGINE.

    how do you write the code?

    if you include the file with angle bracket.

    # include <xyz.h>

    you should change it with double quotation.

    # include "xyz.h"

    --- Quote End ---

    I did the same. Problem persists.

    Please note that it is not my own code and I am using somebody else code.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hello,

    did you add the path of xyz.h to the Nios II Application Paths?

    (right click the project -> properties-> NiosII application prop.-> NiosII app. path, then put the path to App. include dirs)

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

    --- Quote Start ---

    Hello,

    did you add the path of xyz.h to the Nios II Application Paths?

    (right click the project -> properties-> NiosII application prop.-> NiosII app. path, then put the path to App. include dirs)

    Jens

    --- Quote End ---

    Thank for reply.

    Do you mean in the BSP project location?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    no in the user application project

    --- Quote End ---

    Problem seems to be solved. I re-indexed after BSP regeneration and before rebuilding the project.

    That solved the problem.

    Thank you sir. Appreciated your help.