User Include Directories recursive?

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • User Include Directories recursive?

    I am trying to add user include directories and it seems like I need to add every subdirectory individually before it is recognized and can be found. E.g. the header files reside in

    Source Code

    1. C:\foo\bar1
    2. C:\foo\bar2


    When I only include C:\foo in the User Include Directories I get compiler errors about missing files. Do I need to include all sub-folders to get it working or is there a recursive way of doing it. I have quite a few sub-folders and sub-sub..directories so that means a little manual work.

    Also: The files in C:\foo\bar1 and C:\foo\bar2 are all included in my project so I am suprised that I have to specify these a User Include Directory. Is that normal?

    I am Using Segger Embedded Studion Release 3.12 Build 2107020902.31103 on a Windows x64 machine.

    Thanks!
  • Not sure what the answer is but I solved it fairly by running cmd

    Source Code

    1. dir /s > directory.txt

    on my repo to get all files, folders and subfolder. Then I parsed out all filenames and was left with a list of subdirectories. This can be easily modified in VIM, Notepad++, etc. to look like this:



    Source Code

    1. $(ProjectDir)/foo/bar
    2. $(ProjectDir)/foo/bar/foo
    3. ...
    4. ...


    So in 5 minutes I had all folder and their subfolders that I pasted into the User Include Directories.
  • Hello Alex,

    Thank you for your inquiry. Sorry for the delay in response.
    I am trying to add user include directories and it seems like I need to add every subdirectory individually before it is recognized and can be found. E.g. the header files reside in

    Yes all directories need to be added separately.
    For easier usage you can use standard command line instructions like ./Directory1 or ../Directory2 etc. relative to your project folder.
    Or use ES Path Macros like $(ProjectDir) etc.

    Best regards,
    Nino
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.