Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

My vscode cannot recognize "cout" "endl" etc... Linux #765

Closed
igorPhelype opened this issue May 24, 2017 · 3 comments
Closed

My vscode cannot recognize "cout" "endl" etc... Linux #765

igorPhelype opened this issue May 24, 2017 · 3 comments

Comments

@igorPhelype
Copy link

igorPhelype commented May 24, 2017

My Linux configuration (standard):

  • VS Code Version: 1.12.2
  • OS version: Linux Mint 18.1 64 bits
  • C++ plugin: ms-vscode.cpptools from microsoft (Version 0.11.1: May 19, 2017)
{
    "name": "Linux",
    "includePath": [
        "${workspaceRoot}",
        "/usr/include/c++/5",
        "/usr/local/include",
        "/usr/include"
    ],
    "defines": [],
    "browse": {
        "path": [
            "/usr/include/c++/5",
            "/usr/local/include",
            "/usr/include"
        ],
        "limitSymbolsToIncludedHeaders": true,
        "databaseFilename": ""
    }
}

Error message on the editor: "identifier 'cout' is undefined".
Although the program build normaly.

@sean-mcmanus
Copy link
Collaborator

sean-mcmanus commented May 24, 2017

Can you try adding /usr/include/x86_64-linux-gnu and /usr/include/x86_64-linux-gnu/c++/5, assuming those folders exist? If that doesn't work, you can try opening the iostream and child headers to try to find the 1st one with #include files that can't be found.

@igorPhelype
Copy link
Author

Problem solved.
My configuration now:

{
    "name": "Linux",
    "includePath": [
        "${workspaceRoot}",
        "/usr/include/c++/5",
        "/usr/local/include",
        "/usr/include",
        "/usr/include/x86_64-linux-gnu",
        "usr/include/x86_64-linux-gnu/c++/5"
    ],
    "defines": [],
    "browse": {
        "path": [
            "/usr/include/c++/5",
            "/usr/local/include",
            "/usr/include"
        ],
        "limitSymbolsToIncludedHeaders": true,
        "databaseFilename": ""
    }
}

Thank you!

@Frikki
Copy link

Frikki commented May 30, 2017

For others, who may find this issue relevant, your version could be different, e.g., /usr/include/x86_64-linux-gnu/c++/4.8. Simply check with ls /usr/include/x86_64-linux-gnu/c++/.

@github-actions github-actions bot locked and limited conversation to collaborators Oct 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants