how to solve the issue faced while compiling a c code
@sivamukesh Yeah, do you have a compilerPath set? Can you provide your c_cpp_properties.json?
I have this error, too, c_cpp_properties.json like this
{
"configurations": [
{
"name": "Win32",
"includePath": [
"${workspaceFolder}/glibc/**"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
],
"intelliSenseMode": "msvc-x64"
}
],
"version": 4
}
@femvc which compiler are you using? Based on what I see here, the extension is probably unable to find your compiler and related system headers. Can you try setting the compilerPath property (you might need to change intelliSenseMode to gcc-x64 if you're using MinGW)?
@bobbrow i've change to gcc-x64, but still have the same problem
btw i'm using mingw
hey i find this file at "..\MinGW\lib\gcc\mingw32\6.3.0\include",
and i successfully eliminated this warning
this is what my setting look like:
{
"configurations": [
{
"name": "Win32",
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
],
"includePath": [
"C:\\MinGW\\include",
"C:\\MinGW\\lib\\gcc\\mingw32\\6.3.0\\include"
],
"intelliSenseMode": "gcc-x64"
}
],
"version": 4
}
I don't recommend setting the system include path manually. I recommend setting compilerPath so that the extension can ask the compiler what the system include path is. For example:
{
"configurations": [
{
"name": "Win32",
"defines": [
"_DEBUG"
],
"includePath": [
"${workspaceFolder}/glibc/**"
],
"compilerPath": "C:/MinGW/bin/gcc.exe"
"intelliSenseMode": "gcc-x64"
}
],
"version": 4
}
Wow thank u! I didn't notice this parameter.
I'm closing old issues marked "more info needed". If you are still having issues with the extension, please ensure you have installed the latest version and open a new issue with the issue details.
If you are having trouble getting system includes to resolve, please remove any system include paths from includePath and set the compilerPath property in c_cpp_properties.json instead.
thank you
Most helpful comment
I don't recommend setting the system include path manually. I recommend setting
compilerPathso that the extension can ask the compiler what the system include path is. For example: