0 votes

Hello, I am getting into Godot with C++ libs, on Linux. But with VS Code, I can not get the intellisence work on. This is my ccppproperties.json. I have used relative or absolute paths, but nothing.
The directory path
GodotCPP
... .vscode (Vscode config)
--- godot-cpp (from git, and libraries)
--- src (My C++ code)
--- Testing
cpp ( Godot Workspace)
--- SConstruct

{
"configurations": [
    {
        "name": "Linux",
        "includePath": [
            "${workspaceFolder}/**",
            "/media/cris/Panzer/Cris/Documents/Workspace_Linux/Godot/Godot_CPP_00/godot-cpp/godot_headers/",
            "/media/cris/Panzer/Cris/Documents/Workspace_Linux/Godot/Godot_CPP_00/godot-cpp/include/",
            "/media/cris/Panzer/Cris/Documents/Workspace_Linux/Godot/Godot_CPP_00/godot-cpp/include/core/",
            "/media/cris/Panzer/Cris/Documents/Workspace_Linux/Godot/Godot_CPP_00/godot-cpp/include/gen/",
            "/media/cris/Panzer/Cris/Documents/Workspace_Linux/Godot/Godot_CPP_00/godot-cpp/src/",
            "/media/cris/Panzer/Cris/Documents/Workspace_Linux/Godot/Godot_CPP_00/godot-cpp/src/core",
            "/media/cris/Panzer/Cris/Documents/Workspace_Linux/Godot/Godot_CPP_00/godot-cpp/src/gen"
        ],
        "defines": [],
        "compilerPath": "/usr/bin/clang",
        "cStandard": "c11",
        "cppStandard": "c++17",
        "intelliSenseMode": "clang-x64"
    }
],
"version": 4
}
in Engine by (37 points)

1 Answer

+1 vote

Are you working off an external drive? Your path suggests as such, which is fine - just wanted to make sure that's what you're doing to ensure your paths are correct. Additionally, ensure the external drive is mounted when running this.

If not, you may want to chance to something like /home/Documents/...

by (29 points)

Yeah, I am working in a external drive. But I have figured out hot to enable the intellisence.
0) This is on linux (Ubuntu)
1) In VS Code settings add this:

"clang.cxxflags": [
"-std=c++11",
"-std=c++14",
"-std=c++17",
"-std=c++20",
"-I/yourlocation/godot-cpp/godot_headers", // header files
"-I/yourlocation/godot-cpp/include", // Include
"-I/yourlocation/godot-cpp/include/core",
"-I/yourlocation/godot-cpp/include/gen",
],

and on ccppproperties.json, also add

"/yourlocation/godot-cpp/godot_headers", // header files
"/yourlocation/godot-cpp/include", // Include
"/yourlocation/godot-cpp/include/core",
"/yourlocation/godot-cpp/include/gen",

Thank you!

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.