When started up with Visual Studio Code , This problem happened.
Thanks for help...
How to fix "include path " problems in VS code IDE?
How to fix "include path " problems in VS code IDE?
- Attachments
-
- include path.png (99.73 KiB) Viewed 30769 times
- TinkerBearNZ
- Posts: 9
- Joined: Mon Jun 17, 2019 11:20 pm
Re: How to fix "include path " problems in VS code IDE?
Do you have the C/C++ Extension installed?
I'm struggling to remember what I did to fix this, but I believe it's a matter of letting or making the C/C++ extension use build/compile_commands.json to find the proper include path.
compile_commands.json is available after you've done your first build.
I'm struggling to remember what I did to fix this, but I believe it's a matter of letting or making the C/C++ extension use build/compile_commands.json to find the proper include path.
compile_commands.json is available after you've done your first build.
Re: How to fix "include path " problems in VS code IDE?
Hello,
These combination of the extension version works for me.
c/c++ ver 1.1.3
Espressif idf 0.5.1
Also to get rid of the error lines, you need to build the project first. Only after that vscode will be able to find the headers. Thanks!
These combination of the extension version works for me.
c/c++ ver 1.1.3
Espressif idf 0.5.1
Also to get rid of the error lines, you need to build the project first. Only after that vscode will be able to find the headers. Thanks!
Re: How to fix "include path " problems in VS code IDE?
I had he same problem, I downloaded MinGW compiler then I added his directory to the "environment variable" -or something like that- then it was solved, but the build failes, and there is an error in he C/C++ cofiguration (UI) displaying:
Cannot find: ${env:IDF_PATH}/components/
Cannot find: ${env:ADF_PATH}/components/
Cannot find: ${env:ADF_PATH}/components/
and I'm searching for a solution right now.
Cannot find: ${env:IDF_PATH}/components/
Cannot find: ${env:ADF_PATH}/components/
Cannot find: ${env:ADF_PATH}/components/
and I'm searching for a solution right now.
Re: How to fix "include path " problems in VS code IDE?
Add compile_commands.json to your c_cpp_properties.json
Code: Select all
"compileCommands": "${workspaceFolder}/build/compile_commands.json"
Re: How to fix "include path " problems in VS code IDE?
I have the same issue and am following along. How do I " Add compile_commands.json to your c_cpp_properties.json"atemiz wrote: ↑Sun Apr 03, 2022 12:23 pmAdd compile_commands.json to your c_cpp_properties.json
Code: Select all
"compileCommands": "${workspaceFolder}/build/compile_commands.json"
Currently my c_cpp_properties.json file is
{
"configurations": [
{
"name": "Win32",
"includePath": [
"${workspaceFolder}/**",
"${config:idf.espIdfPath}/components/**"
],
"browse": {
"path": [
"${config:idf.espIdfPath}/components"
],
"limitSymbolsToIncludedHeaders": false
},
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
],
"cStandard": "c17",
"cppStandard": "c++17",
"intelliSenseMode": "windows-gcc-x64",
"configurationProvider": "ms-vscode.cpptools",
"compilerPath": "C:\\.espressif\\tools\\xtensa-esp32-elf\\esp-2021r2-patch3-8.4.0\\xtensa-esp32-elf\\bin\\xtensa-esp32-elf-gcc.exe"
}
],
"version": 4
}
Re: How to fix "include path " problems in VS code IDE?
As an example, the configuration file content that I am currently using is as follows;ohsnapfit wrote: ↑Wed May 04, 2022 11:37 pmI have the same issue and am following along. How do I " Add compile_commands.json to your c_cpp_properties.json"atemiz wrote: ↑Sun Apr 03, 2022 12:23 pmAdd compile_commands.json to your c_cpp_properties.json
Code: Select all
"compileCommands": "${workspaceFolder}/build/compile_commands.json"
Code: Select all
{
"configurations": [
{
"name": "ESP32-C3",
"includePath": [
"${default}"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
],
"cStandard": "c17",
"cppStandard": "c++17",
"compileCommands": "${workspaceFolder}/build/compile_commands.json"
}
],
"version": 4
}
Who is online
Users browsing this forum: Majestic-12 [Bot], twompark and 92 guests