Include errors detected

Pleas, help my!
Platformio do not finds mbed library

#include errors detected. Please update your includePath. IntelliSense features for this translation unit (/home/asus/dfg/src/main.cpp) will be provided by the Tag Parser.

This is a known issue #4976 with Microsoft C/C++ extension and you can ignore it. It does not affect compilation or flashing processes.

A few workarounds:

  1. Please use the latest VSCode and PlatformIO Core (VSCode > Left Sidebar > PlatformIO > Quick Access > Upgrade PlatformIO Core).
  2. Remove .vscode folder from a project and restart VSCode.
  3. Build project and restart VSCode again.
  4. Try to use 1 project per 1 workspace. This is a bug of C/C++ extension #4976. You can skip this workaround when this issue will be fixed.

Sorry for these issues. We work with Microsoft Team on improving C/C++ extension.

1 Like

@ivankravets

Removing the .vscode folder doesn’t work for me. Did it several times in different orders of
PIO close/
remove with PIO/
delete with Windows Explorer. Problem remain.

I can’t find where to change PIO includepath. Will it help to change it, if so, will you please give a hint where it is?

+++++++++++++++++++++++++++++++++++++
My system info:
Operating system:
Windows 10 x64

VS Code:
Version: 1.33.1 (user setup)

Platform IO:
1.7.1

Could you provide a simple project to reproduce this issue?

I got rid of the problem by removing the folders and add my project folders directly in the “Untitled workspace” in PIO. I wanted to add my test projects in their own folder, so that I later can segregate my other projects maybe in several different folders. Don’t know whether is is possible, but for now I’m ok.

Untitled%20workspace

1 Like

I always use “open folder” for my projects. It makes life much simpler, in the end.

@mrred128

What “open folder” do you rever to or do you perhaps rever to “Add folder to workspace”?

I have used it, but it only seems to work if the project folders is directly in “Untitled workspace”.

Wanted to do something like this, but it seems to be uncompatible with PIO.

+++++++++++++++++++
Untitled workspace

Category 1

Project1
Project2
Project3

Category 2

ProjectA
ProjectB
ProjectC

Category 3

ProjectX
ProjectY
ProjectZ

(

Probably File → Open Folder… which will basically replace the current workspace with the contents of that folder. But it does allow you to have your folder structure however you want it.

@pfeerick

Ahh, didn’t think about the “File” menu, thanks.

1 Like

Yes. Sorry I wasn’t that clear… :slight_smile:

1 Like

All good @Werner_Smook @mrred128 … we all have those moments every now and then! (avoids looking at breadboard helper adapter thingy that have been looking for last two days which is sat right in front of me under the monitor… :laughing:)

Доброго дня!
Надоело бороться с ошибкой


Предложенный выше фикс помогает только до следующей перезагрузки vscode.
Как побороть сие недоразумение?
Спасибо.

Translated to Russian

VSCode and IntelliSense is sometimes fussy about how you do the #include.

The error should go away if you change #include "main.h" to #include <main.h>

You may need to do a IntelliSense index rebuild…


Перевод с английского

VSCode и IntelliSense иногда суетятся из-за того, как вы делаете #include.

Ошибка должна исчезнуть, если вы измените #include "main.h" на #include <main.h>

Вам может потребоваться перестроить индекс IntelliSense …

1 Like

Спасибо за ответ…
Я, видимо, привёл не тот пример для показа проблемы.
2019-05-29_18-34-15
Мне теперь во всех стандартных библиотеках менять <> на “”??? У PlatformIO новый стандарт? Бред какой-то…
Да и про перестройку индекса IntelliSense я слышу не впервые. Не ПОМОГАЕТ!
Топик-то зачем перенесли???.. Эх… Модераторы…
Вариант решения проблемы (УДАЛЕНИЕ каталога .vscode из проекта) в теме из которой мой пост был зачем-то вырезан в отдельную тему помогает ровно до следующего перезапуска vscode.
Всё ещё надеюсь на адекватную помощь.

Translated to Russian:

My apologies, I didn’t realise from your earlier post that it was related to the .vscode workaround that was suggested. I’ll move it back.

No, there is no new standard in PlatformIO… Using "<" ">" has always been the method of referencing the standard include paths, as opposed to the absolute path.

However, it appears you have a different issue. Another solution to try might be to re-create the workspace - i.e. create a new project, and move your source files into it… this is what appeared to worked for someone else.


Мои извинения, я не понял из вашего предыдущего поста, что это было связано с предложенным обходным решением .vscode. Я верну его обратно.

Нет, в PlatformIO нет нового стандарта … Использование "<" ">" всегда было методом ссылки на стандартные пути включения, в отличие от абсолютного пути.

Однако, похоже, у вас другая проблема. Другое решение, которое можно попробовать, может состоять в том, чтобы воссоздать рабочее пространство - то есть создать новый проект и переместить в него ваши исходные файлы … это то, что, похоже, сработало для кого-то другого.

Wow! My problem re moved again, great!
Before contacting you, I myself tried to find a solution to this problem. Nothing helps …
The fact is that projects are compiled normally. This error is very annoying and prevents the identification of true errors.
New project - the same. The new workspace - the same.
Running Vscode as administrator - the same…

Deleting a .vscode directory from a project each time already lead to nervous tick.

My system Windows 10 64 bit.
Vscode last version.
PlatformIO last version.
What My to do?
P.S. My question about the new standard in PlatformIO and about " ", " <> " was sarcastic.

Just can’t win, can I? :blush: :stuck_out_tongue:

Very annoying indeed. I can appreciate that “deleting” from your project would be… nerve racking… what if you delete the wrong folder! :open_mouth:

All I can suggest is to check if your antivirus, if any, is causing it… (turn anti virus off for a minute, delete the .vscode folder, start vscode, let it rebuild and see if the error is gone or not).

If not, you could delete %USERPROFILE%\.platformio\packages, and start vscode, and see if the errors go away after a build.

Next up is to either delete %USERPROFILE%\.platformio and make it completely reinstall when you start VSCode. Or, try pio upgrade --dev from the terminal, and see if upgrading to the dev branch changes anything… it worked for one person.

The real annoyance with this sort of issue is that often others can’t reproduce it, so it’s hard to work out what exactly has gone wrong. :-/

Very funny.
Of all the available options, I just remained to reinstall Windows.
How could I not have guessed?
Thanks for the help.
Keep laughing.

I’ll try… :slight_smile:

Please let me know if you do get any further with this… it would be nice to know that removing Windows and installing Linux isn’t the best option!

I suspected that I would be politely advised to install Linux.
But I did not think that this would be the only solution to my problem.
You do not leave me a choice.
Bill Geitz again loses the next user. Linus Torvalds triumphs.
The second time I ask for help on your forum and get a lot of emotions. Only emotions.
You made my day!

1 Like