Page 1 of 1

Faulty inclusion check solution (Unresolved inclusion)

Posted: Thu Sep 02, 2021 10:17 am
by d1nuc0m
Hello!
I am using ChibiStudio 2020-04 on Windows 10, and I've had problems with library inclusion check.

If I include a "standard" library (for example #include "string.h"), the project compiles & works, but ChibiStudio gives a warning about "Unresolved inclusion". I know that warnings can be ignored, but it is inconvenient having to distinguish a wrong warning from a real one.

I have found the reasons, so I would like to suggest a workaround/solution:
  • A part of the issue is due to Eclipse on a non-English system like mine. The solution is set the following environment variables in Preferences - C/C++ - Build - Environment. LANG = en_US, LANGUAGE = en_US, LC_ALL = en_US.UTF-8. These should be set to replace native environment ones. Reference: (1), (2), (3).
  • Then, as of topic 1759, the standard header paths (like C:\ChibiStudio\tools\GNU Tools ARM Embedded\9.0 2019q4\arm-none-eabi\include) should be included to the project (Properties - C/C++ General - Paths and symbols or Preprocessor Include Paths, Macros etc.). Maybe these folders could be already included in the default configurations.

Thank you :D

Re: Faulty inclusion check solution (Unresolved inclusion)

Posted: Thu Sep 02, 2021 10:28 am
by Giovanni
Hi,

Thanks for hints, very useful. The problem with putting paths in project settings is that not all users have same paths, some use customized Eclipse environments, some others use Linux or MacOS where paths are simply different.

Giovanni

Re: Faulty inclusion check solution (Unresolved inclusion)

Posted: Thu Sep 02, 2021 12:53 pm
by d1nuc0m
Giovanni wrote:Hi,

Thanks for hints, very useful. The problem with putting paths in project settings is that not all users have same paths, some use customized Eclipse environments, some others use Linux or MacOS where paths are simply different.

Giovanni

Thank you, is there a way to document this behavior of ChibiStudio (wiki, FAQ etc), so that if needed is an easy-to-find information?

Re: Faulty inclusion check solution (Unresolved inclusion)

Posted: Thu Sep 02, 2021 1:06 pm
by Giovanni
hi,

We don't have a documentation effort ongoing for ChibiStudio, it is just a collection of existing tools.

I could add a small article to the web site (it is a wiki basically).

Giovanni

Re: Faulty inclusion check solution (Unresolved inclusion)

Posted: Thu Sep 02, 2021 7:36 pm
by Giovanni
BTW those env variables could be set in the ChibiStudio launch batch files, so no need to change settings and projects.

We will add this to next release.

Giovanni

Re: Faulty inclusion check solution (Unresolved inclusion)

Posted: Thu Sep 02, 2021 8:26 pm
by d1nuc0m
Giovanni wrote:hi,

We don't have a documentation effort ongoing for ChibiStudio, it is just a collection of existing tools.

I could add a small article to the web site (it is a wiki basically).

Giovanni


It's not a bad idea, to have this documented in a more "obvious" place than a random topic

Giovanni wrote:BTW those env variables could be set in the ChibiStudio launch batch files, so no need to change settings and projects.

We will add this to next release.

Giovanni


Thank you! :D