For users of MinGW on Windows running extension version 0.16.1 or earlier, you must manually configure c_cpp_properties.json to ensure IntelliSense works correctly.
Key requirements:
- intelliSenseMode: Set this to
clang-x64. - includePath: You must include the specific system header paths used by your MinGW installation. You can find the correct paths by running
gcc -v -E -x c++ nul in your terminal. - defines: You must define
__GNUC__=# where # is the major version of your installed toolchain (e.g., __GNUC__=6). - Version Matching: Ensure all paths in
includePath and browse.path match your specific MinGW version number (e.g., changing 6.3.0 to your installed version).
To create this file, select C/Cpp: Edit Configurations from the VS Code command palette.
{
"configurations": [
{
"name": "MinGW",
"intelliSenseMode": "clang-x64",
"includePath": [
"${workspaceRoot}",
"C:/MinGW/lib/gcc/mingw32/6.3.0/include/c++",
"C:/MinGW/lib/gcc/mingw32/6.3.0/include/c++/mingw32",
"C:/MinGW/lib/gcc/mingw32/6.3.0/include/c++/backward",
"C:/MinGW/lib/gcc/mingw32/6.3.0/include",
"C:/MinGW/include",
"C:/MinGW/lib/gcc/mingw32/6.3.0/include-fixed"
],
"defines": [
"_DEBUG",
"__GNUC__=6",
"__cdecl=__attribute__((__cdecl__))"
],
"browse": {
"path": [
"C:/MinGW/lib/gcc/mingw32/6.3.0/include",
"C:/MinGW/lib/gcc/mingw32/6.3.0/include-fixed",
"C:/MinGW/include/*",
"${workspaceRoot}"
],
"limitSymbolsToIncludedHeaders": true,
"databaseFilename": ""
}
}
]
}