Ever since my MacBook was updated, I am not able to solve this error that says "#include errors detected. Please update your includePath".
Here is my c_cpp_properties.json file.
{
"configurations": [
{
"name": "Mac",
"includePath": [
"${workspaceFolder}/**"
],
"defines": [],
"macFrameworkPath": [],
"compilerPath": "/usr/local/bin/g++",
"cStandard": "gnu17",
"cppStandard": "gnu++14",
"intelliSenseMode": "macos-gcc-x64"
}
],
"version": 4
}
{
"configurations": [
{
"name": "Mac",
"includePath": [
"/usr/local/Cellar/gcc/10.2.0_4/include/c++/10.2.0/x86_64-apple-darwin20"
],
"defines": [],
"macFrameworkPath": [],
"compilerPath": "/usr/local/bin/g++",
"cStandard": "gnu17",
"cppStandard": "gnu++14",
"intelliSenseMode": "macos-gcc-x64"
}
],
"version": 4
}
Try this path
Related
I am wracking my brain trying to figure out how to have VS Code recognize glib.
#include errors detected. Please update your includePath. Squiggles are disabled for this translation unit (Q:\code\srctext\text_lexer.c).C/C++(1696)
cannot open source file "glibconfig.h" (dependency of "glib-2.0/gmodule.h")C/C++(1696)
I have manually built glib and have the following *.dll and *.pdb files:
gio-2.0-0
glib-2.0-0
gmodule-2.0-0
gobject-2.0-0
gthread-2.0-0
but I do not know if this is necessary to include when vcpkg has it installed?
I have installed glib using vcpkg (Package glib:x86-windows is already installed).
Thanks!
I'm not sure what combination of corrections did the trick, but the errors went away when my c_cpp_properties.json file looked like below.
c_cpp_properties.json
{
"configurations": [
{
"name": "Win32Debug",
"includePath": [
"${workspaceFolder}/include/debug/**",
"C:/sync/name/code/projects/frameworks/projectA/projectA/include/**",
"C:/sync/name/code/libraries/c c++/GTK/glib/lib/glib-2.0/include",
"C:/sync/name/code/libraries/c c++/GTK/glib/include/glib-2.0"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
],
"windowsSdkVersion": "10.0.18362.0",
"cStandard": "c17",
"cppStandard": "c++20",
"intelliSenseMode": "windows-gcc-x86",
"browse": {
"limitSymbolsToIncludedHeaders": true,
"databaseFilename": "${default}",
"path": [
"${workspaceFolder}/include/debug/**",
"C:/sync/name/code/projects/frameworks/projectA/projectA/include/debug/**",
"C:/sync/name/code/libraries/c c++/GTK/glib/lib/glib-2.0/include",
"C:/sync/name/code/libraries/c c++/GTK/glib/include/glib-2.0"
]
},
"compilerArgs": [],
"compilerPath": "C:/msys64/mingw64/bin/gcc.exe",
"forcedInclude": [
"${default}"
]
},
{
"name": "Win64Debug",
"includePath": [
"${workspaceFolder}/include/debug/**",
"D:/backup/sync/name/code/projects/frameworks/projectA/projectA/include/debug/**",
"D:/backup/sync/name/code/libraries/c c++/GTK/glib/lib/glib-2.0/include",
"D:/backup/sync/name/code/libraries/c c++/GTK/glib/include/glib-2.0"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
],
"windowsSdkVersion": "10.0.18362.0",
"compilerPath": "C:/msys64/mingw64/bin/gcc.exe",
"cStandard": "c17",
"cppStandard": "c++17",
"intelliSenseMode": "linux-gcc-x64",
"compilerArgs": [],
"browse": {
"path": [
"${workspaceFolder}/include/debug/**",
"C:/sync/name/code/projects/frameworks/projectA/projectA/include/debug/**",
"C:/sync/name/code/libraries/c c++/GTK/glib/lib/glib-2.0/include",
"C:/sync/name/code/libraries/c c++/GTK/glib/include/glib-2.0"
],
"limitSymbolsToIncludedHeaders": true
}
}
],
"version": 4
}
Not sure if tasks.json had any influence (frankly Visual Code's inner workings are an opaque impenetrable blob to my attempts at understanding), but just in case:
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"type": "shell",
"label": "C/C++ g++.exe build",
"command": "C:\\msys64\\mingw64\\bin\\g++.exe",
"args": [
"/property:GenerateFullPaths=true",
"/t:build",
"/consoleloggerparameters:NoSummary",
"-g",
"${file}",
"-o",
"${fileDirname}/${fileBasenameNoExtension}",
"--include-directory=C:/sync/name/code/libraries/c c++/GTK/glib/lib/**"
],
"group": {
"kind": "build",
"isDefault": true
},
"presentation": {
"reveal": "silent"
},
"problemMatcher": [
"$gcc"
]
}
]
}
I create a new teams app by using the Teams Apps generator. I selected configurable tab -> scope "team" and "groupchat":
{
"$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.5/MicrosoftTeams.schema.json",
"manifestVersion": "1.5",
"id": "dfbf6890-7268-11ea-ad8e-3f4752fcafa2",
"version": "0.0.1",
"packageName": "test4",
"developer": {
"name": "dev",
"websiteUrl": "https://{{HOSTNAME}}",
"privacyUrl": "https://{{HOSTNAME}}/privacy.html",
"termsOfUseUrl": "https://{{HOSTNAME}}/tou.html"
},
"name": {
"short": "test4",
"full": "test4"
},
"description": {
"short": "TODO: add short description here",
"full": "TODO: add full description here"
},
"icons": {
"outline": "icon-outline.png",
"color": "icon-color.png"
},
"accentColor": "#D85028",
"configurableTabs": [
{
"configurationUrl": "https://{{HOSTNAME}}/smensocloudTab/config.html",
"canUpdateConfiguration": true,
"scopes": [
"team",
"groupchat"
]
}
],
"staticTabs": [],
"bots": [],
"connectors": [],
"composeExtensions": [],
"permissions": [
"identity",
"messageTeamMembers"
],
"validDomains": [
"{{HOSTNAME}}"
]
}
But when i side load the app to test in teams, i only see "Add to a chat" but not "Add to a team".
See the attached Screenshots (frist is how it is, second how i want it).
How can i fix this?
I found it,
if anyone ever has the same problem.
Remove the empty defintions:
"staticTabs": [],
"bots": [],
"connectors": [],
"composeExtensions": []
That solved the case for us.
So I'm using VSCode and am trying to use the whoshuu/cpr headers but it's not working.
I've tried adding cpr/include to the includePath but that hasn't done anything.
Here's my c_cpp_properties.json
{
"configurations": [
{
"name": "Win32",
"includePath": [
"${workspaceFolder}/**",
"${workspaceFolder}/cpr/include/**"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
],
"compilerPath": "C:\\\\mingw-w64\\\\i686-8.1.0-posix-dwarf-rt_v6-rev0\\\\mingw32\\\\bin\\\\gcc.exe",
"cStandard": "c11",
"cppStandard": "c++17",
"intelliSenseMode": "gcc-x64"
}
],
"version": 4
}
Expected: it letting me include cpr
Actual: includePath error.
I'm trying to debug a main.cpp file that resides in a folder that has spaces in its filename: "Jim and the Skyscrapers".
The error message reads:
Unable to open 'Jim': File not found
And it also gives me the option of creating this "Jim" file.
The debug process works only if I rename the file to "JimAndTheSkyscrapers" so that it doesn't have any spaces.
The way i reference the path in the launch.json and c_cpp_properties.json files is by using the environment variable: ${workspaceFolder}.
As a debugger, I use cygwin's gdb.
I think the problem is: either the debugger parses filepaths in a manner that doesn't allow spaces, either it's a vs code problem. Knowing which one it is would be of great help.
{
"version": "0.2.0",
"configurations": [
{
"name": "(gdb) Launch",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/a.exe",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [
{"name": "OUTPUT_PATH", "value": "results.txt"}
],
"externalConsole": true,
"MIMode": "gdb",
"miDebuggerPath": "C:/cygwin64/bin/gdb.exe",
"preLaunchTask": "build",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
}
]
}
c_cpp_properties.json:
{
"configurations": [
{
"name": "Win32",
"includePath": [
"${workspaceFolder}/**"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
],
"compilerPath": "C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.13.26128/bin/Hostx64/x64/cl.exe",
"cStandard": "c11",
"cppStandard": "c++14",
"intelliSenseMode": "msvc-x64"
}
],
"version": 4
}
In Visual Studio, right-click on a .ts file and "Run JS Tests", only the tests in the .ts file run and are counted in the total.
"Run JS Tests" at the folder level or project level and both the tests in the .ts and .js files are run and counted in the total.
Chutzpah.json settings:
{
"Framework": "jasmine",
"TypeScriptCodeGenTarget": "ES5",
"TestHarnessLocationMode": "SettingsFileAdjacent",
"RootReferencePathMode": "SettingsFileDirectory",
"Compile": {
"Mode": "External",
"Extensions": [ ".ts" ],
"ExtensionsWithNoOutput": [ ".d.ts" ]
},
"Tests": [
{ "Path": "Specs"}
]
}
I had the same issue. All my tests are written in TypeScript, so my *.ts files define what tests exist. I had solved it by including only *.ts files.
{
"Tests": [ { "Path": "Specs", "Includes": [ "*.ts" ] } ],
"Compile": {
"Mode": "External",
"Extensions": [ ".ts" ],
"ExtensionsWithNoOutput": [ ".d.ts" ]
}
}
Works like a charm.
Without seeing your full project it is hard to know for sure but something along the following should help achieve this. If you need to include some .js files you can change the exclude patterns accordingly.
```
{
"Framework": "jasmine",
"TestHarnessLocationMode": "SettingsFileAdjacent",
"RootReferencePathMode": "SettingsFileDirectory",
"Compile": {
"Mode": "External",
"Extensions": [ ".ts" ],
"ExtensionsWithNoOutput": [ ".d.ts" ]
},
"References": [
{ "Excludes": ["*.js"]}
],
"Tests": [
{ "Path": "Specs", "Excludes": ["*.js"]}
]
}
```