VS Code + C++ Intellisence, Linux(Ubuntu)

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Cristian

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 c_cpp_properties.json. I have used relative or absolute paths, but nothing.
The directory path
Godot_CPP
… .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
}
:bust_in_silhouette: Reply From: GodotRobot

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/…

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 c_cpp_properties.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!

Cristian | 2020-05-05 17:23