* Operating System and version: windows10-1709
* VS Code version:1.18.0
* C/C++ extension version:0.14.2
today when I open vscode to edit my code it suggests me "cannot open source file "corecrt.h" (dependency of "iostream")"
but it worked well yesterday.
after I change the C_Cpp.intelliSenseEngine setting to Tag Parser.the problems disappear,but itelliSense cannot works as conveniently as my original settings(C_Cpp.intelliSenseEngine:Default)
using VS2015/VC/include or using MinGW/include are the same situation...
I wonder if I forget to add something into c_cpp_properties.json
maybe this is not my fault because vsc worked well yesterday and the program can be run sucessfully
and this is my c_cpp_properties.json now:
{
"name": "Win32",
"includePath": [
"C:/VS2015/VC/include/",
"C:/VS2015/VC/atlmfc/include/",
"C:/Program Files (x86)/Windows Kits/8.1/Include/um",
"C:/Program Files (x86)/Windows Kits/8.1/Include/shared",
"C:/Program Files (x86)/Windows Kits/8.1/Include/winrt",
"${workspaceRoot}"
],
"defines": [
"_DEBUG",
"UNICODE"
],
"intelliSenseMode": "msvc-x64",
"browse": {
"path": [
"C:/VS2015/VC/include/",
"C:/VS2015/VC/atlmfc/include/",
"C:/Program Files (x86)/Windows Kits/8.1/Include/um",
"C:/Program Files (x86)/Windows Kits/8.1/Include/shared",
"C:/Program Files (x86)/Windows Kits/8.1/Include/winrt",
"${workspaceRoot}"
],
"limitSymbolsToIncludedHeaders": true,
"databaseFilename": ""
}
}
the problem is solved,sorry for trouble caused
@Hanano-Yuuki ,hello , how did you solve this problem at last , I just have the same problem!
@Zeta-lime I think it may help you:
https://github.com/Microsoft/vscode-cpptools/blob/master/Documentation/LanguageServer/MinGW.md
by the way,run g++ -Wp,-v -E -xc -x c++ NUL to see the include files(if you use G++)
and the order is important
hope it can help you
Thank you this is exactly answer I am seek for!
发送自 Windows 10 版邮件应用
发件人: Hanano-Yuuki
发送时间: 2017年11月15日 23:17
收件人: Microsoft/vscode-cpptools
抄送: Phillins Lime; Mention
主题: Re: [Microsoft/vscode-cpptools] cannot open source file "corecrt.h"(dependency of "iostream") (#1237)
@Zeta-lime I think it may help you:
https://github.com/Microsoft/vscode-cpptools/blob/master/Documentation/LanguageServer/MinGW.md
by the way,run g++ -Wp,-v -E -xc -x c++ NUL to see the include files(if you use G++)
and the order is important
hope it can help you
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
You fixed this problem by changing to gcc as the compiler...For someone choosing MSVC, I fixed the "cannot open source file "corecrt.h" (dependency of "iostream")" issue by changing the include path in _c_cpp_properties.json_
"D:/Program Files/Microsoft/MSVC2017/VC/Tools/MSVC/14.12.25827/include/*",
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.10240.0/ucrt",
"C:/Program Files (x86)/Windows Kits/10/Lib/10.0.10240.0/ucrt/x64",
I installed MSVC on D: drive, you may change that according.
You fixed this problem by changing to gcc as the compiler...For someone choosing MSVC, I fixed the "cannot open source file "corecrt.h" (dependency of "iostream")" issue by changing the include path in _c_cpp_properties.json_
"D:/Program Files/Microsoft/MSVC2017/VC/Tools/MSVC/14.12.25827/include/*",
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.10240.0/ucrt",
"C:/Program Files (x86)/Windows Kits/10/Lib/10.0.10240.0/ucrt/x64",I installed MSVC on D: drive, you may change that according.
The last line does the job. You can omit the rest lines safely.
Most helpful comment
You fixed this problem by changing to gcc as the compiler...For someone choosing MSVC, I fixed the "cannot open source file "corecrt.h" (dependency of "iostream")" issue by changing the include path in _c_cpp_properties.json_
I installed MSVC on D: drive, you may change that according.