Quantcast
Viewing all articles
Browse latest Browse all 22116

C++ IntelliSense in Visual Studio Code doesnt recognize C++ STL

I'm using Visual Studio Code on my Linux laptop. I just wrote a simple program like this one in main.cpp:

#include<iostream>

int main()
{

}

Yesterday everything was working just fine. Today I open a new file and it says it doesnt recognize any of STL libraries. This is what I get when I hover over it:

#include errors detected. Please update your includePath. Squiggles are disabled for this translation unit (/home/john/Documents/main.cpp).C/C++(1696)
cannot open source file "iostream"C/C++(1696)

I run a few command to check my compiler and setting. Those are my intellisense settings:

{
    "configurations": [
        {
            "name": "Linux",
            "includePath": [
                "${workspaceFolder}/**"
            ],
            "defines": [],
            "compilerPath": "/usr/bin/clang",
            "cStandard": "c11",
            "cppStandard": "c++17",
            "configurationProvider": "go2sh.cmake-integration"
        }
    ],
    "version": 4
}

This is some info about my g++ compiler and my clang compiler:

g++

john@john-GL63-8RC:~$ whereis g++
g++: /usr/bin/g++ /usr/share/man/man1/g++.1.gz
john@john-GL63-8RC:~$ g++ --version
g++ (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

clang:

john@john-GL63-8RC:~$ whereis clang
clang: /usr/bin/clang /usr/lib/clang /usr/include/clang /usr/share/man/man1/clang.1.gz
john@john-GL63-8RC:~$ clang --version
clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin

Also I think they are old but all I did was to install the via apt-get how do I update them? How can I repair it? I didnt change anything and it just started going crazy by itself


Viewing all articles
Browse latest Browse all 22116

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>