Missing header files in correct configuration with CLion


I am using the Open Source Smartwatch project (stock configuration, as seen on github) it builds perfetly fine from the command line, and the includes and intellisense works with VScode as expected. However when I open the same project with the CLion PlatformIO extension the intellisense is broken and it cannot find the includes, but clicking build works as expected because the configuration is fine.

Where should I look for a solution? Toolchains?

You’re possibly running into this caveat or haven’t setup the CMake profiles correctly.

Does a right-click on the project and “Reload CMake” show any error messages?

Yes I have several errors, it looks like it is feeding gcc VS style command line switches.
But I dont have MinGW installed on my system, I can’t switch to it (my gcc/++ comes from PlatformIO).
If I switch it to MinGW in CLion then I have even more errors, I get the same errors when reloading and my builds fail too (they ran fine before)

Have you setup the toolchain exactly as per Arduino.h not found - #11 by maxgerhardt?

Also I assume the repo you’re referencing is GitHub - Open-Smartwatch/open-smartwatch-os: The Open-Smartwatch Operating System.?

Aha! So I need a full-blown MinGW compiler for it to work, but not for it to compile with just to have a gcc like environment, I see

Yes that’s exactly the caveat, it is not used for building, but without that, CLion is just not happy.

Assuming I’ve lnked to the correct project above, I have no problems at all. All include files and types are found.






1 Like