0
votes

I am using visual studio code for c++ programming. Whenever I run my program, it gives me the following error:

include errors detected.

Please update your includePath.

Squiggles are disabled for this translation unit (/home/yash_j1301/Documents/GitHub/C++ Workspace/yash1.cpp).

I am using Ubuntu 19.04 Disco Dingo and quite new to c++ programming. On the internet, I found some solutions like giving the path to the header files and I did that but still it is showing me errors. I already have installed and updated all the c/c++ extensions for the same.

Any idea where it is going wrong? I have already attached the screenshot for the error.

Here is my c_cpp_properties.json file code:

{
    "configurations": [
        {
            "name": "Linux",
            "includePath": [
              "${workspaceFolder}/**",
              "/home/yash_j1301/TC/INCLUDE/**"
            ],
            "defines": [],
            "compilerPath": "/usr/bin/gcc",
            "cStandard": "c11",
            "cppStandard": "c++17",
            "intelliSenseMode": "clang-x64"
        },
        {
            "name": "conf1",
            "includePath": [
                "/home/yash_j1301/TC/CLASSLIB/INCLUDE/",
                "/home/yash_j1301/TC/INCLUDE/SYS/",
                "/home/yash_j1301/TC/INCLUDE/"
            ],
            "defines": [],
            "compilerPath": "/usr/bin/gcc",
            "cStandard": "c11",
            "cppStandard": "c++17",
            "intelliSenseMode": "clang-x64"
        }
    ],
    "version": 4
}

Any idea what I'm missing out?

1

1 Answers

0
votes

These are the things you can do :

  1. check if you have installed the c/c++ extension.

enter image description here

  1. Check if mingw-w64 is installed (http://www.mingw-w64.org/doku.php )
  2. right click on the import statement and add it to the path : enter image description here

Here are all the details: https://code.visualstudio.com/docs/languages/cpp