如何解决vs 代码 esp-idf 未解析从标准 c 库 windows 10 导入
C:\Users\Lasse\esp\esp-idf\examples\get-started\blink.vscode\settings.json 看起来像这样:
{
"idf.portWin": "COM3","idf.flashType": "UART","files.associations": {
"sdkconfig.h": "c"
},"C_Cpp.default.compilerPath": ""
}
C:\Users\Lasse\AppData\Roaming\Code\User\settings.json 看起来像这样:
{
"idf.espIdfPathWin": "C:\\Users\\Lasse\\esp\\esp-idf","idf.pythonBinPathWin": "c:\\Users\\Lasse\\.espressif\\python_env\\idf4.2_py3.8_env\\Scripts\\python.exe","idf.customExtraPaths": "C:\\Users\\Lasse\\.espressif\\tools\\xtensa-esp32-elf\\esp-2020r3-8.4.0\\xtensa-esp32-elf\\bin;C:\\Users\\Lasse\\.espressif\\tools\\xtensa-esp32s2-elf\\esp-2020r3-8.4.0\\xtensa-esp32s2-elf\\bin;C:\\Users\\Lasse\\.espressif\\tools\\esp32ulp-elf\\2.28.51-esp-20191205\\esp32ulp-elf-binutils\\bin;C:\\Users\\Lasse\\.espressif\\tools\\esp32s2ulp-elf\\2.28.51-esp-20191205\\esp32s2ulp-elf-binutils\\bin;C:\\Users\\Lasse\\.espressif\\tools\\cmake\\3.16.4\\bin;C:\\Users\\Lasse\\.espressif\\tools\\openocd-esp32\\v0.10.0-esp32-20200709\\openocd-esp32\\bin;C:\\Users\\Lasse\\.espressif\\tools\\ninja\\1.10.0;C:\\Users\\Lasse\\.espressif\\tools\\idf-exe\\1.0.1;C:\\Users\\Lasse\\.espressif\\tools\\ccache\\3.7;C:\\Users\\Lasse\\.espressif\\tools\\dfu-util\\0.9\\dfu-util-0.9-win64","idf.customExtraVars": "{\"OPENOCD_SCRIPTS\":\"C:\\\\Users\\\\Lasse\\\\.espressif\\\\tools\\\\openocd-esp32\\\\v0.10.0-esp32-20200709/openocd-esp32/share/openocd/scripts\",\"IDF_CCACHE_ENABLE\":\"1\"}","idf.portWin": "COM3","idf.port": "/dev/ttyUSB3","C_Cpp.default.includePath": [
"C:\\Users\\Lasse\\esp\\**"
],"C_Cpp.intelliSenseEngine": "Tag Parser"
}
"C_Cpp.intelliSenseEngine": "Tag Parser" - 帮助解决非标准库导入问题
C:\Users\Lasse\esp\esp-idf\examples\get-started\blink.vscode\c_cpp_properties.json 看起来像这样:
{
"configurations": [
{
"name": "Win32","includePath": [
"${workspaceFolder}\\**","C:\\Users\\Lasse\\esp\\**"
],"defines": [
"_DEBUG","UNICODE","_UNICODE"
],"cStandard": "c17","cppStandard": "c++17","intelliSenseMode": "windows-msvc-x64"
}
],"version": 4
}
我认为这可能与遗漏有关
"C_Cpp.default.compilerPath": ""
编译器在哪里?
解决方法
此视频可能对https://www.youtube.com/watch?v=KRyvly_SYS8有所帮助(从 10:18 到 14:34)。
我按照此过程解决了包含错误。按 F1,然后选择 C/C++ 编辑配置 (UI)。
包括路径:
参考:https://github.com/espressif/vscode-esp-idf-extension/issues/26#issue-556057077
${workspaceFolder}/**
${env:IDF_PATH}/components/**
build/config
编译器路径:
检查https://github.com/espressif/vscode-esp-idf-extension/issues/27#issuecomment-580165821
智能感知模式:
选择 gcc-x64(legacy)
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。