Witam.
Zainstalowałem ostatnio linux'a mint'a na swoim drugim laptopie. Chcąc "po programować sobie", pobrałem Visual Studio Code.
Błędy jakie mi wyrzuca są często opisywane w internecie, aczkolwiek wspomagając się wyjaśnieniami owymi na różnych forach nie udało mi się sprawić, aby u mnie działało.
Zwracam się właśnie z tego powodu do Was.
#include errors detected. Please update your includePath. IntelliSense features for this translation unit (/home/chucksqll/.vscode/extensions/hello world/hello.cpp) will be provided by the Tag Parser.
could not open source file "iostream" (no directories in search list)
#include <iostream>
using namespace std;
int main(int argc, char const *argv[])
{
cout << "hello world" << endl;
return 0;
}
Z main'em wszystko w porządku.
plik c_cpp_properties.json
{
"configurations": [
{
"name": "Linux",
"browse": {
"path": [
"${workspaceFolder}",
"/usr/include/c++/5",
"/usr/include/linux",
"usr/lib/gcc"
],
"limitSymbolsToIncludedHeaders": true
},
"includePath": [
"${workspaceFolder}/**",
"/usr/include/c++/5",
"/usr/include/linux",
"usr/lib/gcc"
],
"defines": [
"_DEBUG",
"UNICODE"],
"compilerPath": "/usr/bin/gcc",
"cStandard": "c11",
"cppStandard": "c++17",
"intelliSenseMode": "clang-x64",
"databaseFilename": ""
}
],
"version": 4
}
Uprzedzam, że w tym momencie mogą tam się znaleźć śmieci, ze względu na to, że próbowałem dodać coś aby działało.
Plik tasks.json
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "build",
"type": "shell",
"command": "g++ -g hello.cpp -o hello",
"args": [
"-g", "hello.cpp"
],
"group": {
"kind": "build",
"isDefault": true
}
}
]
}