Open schwarzichet opened 6 years ago
Where does llvm live on your PC? Do you have a C:\libraries
folder on your PC, or is that configuration just the value copied from the documentation? You should add the path to the llvm folder in your configuration browse.path
and includePath
if you want it to show up in IntelliSense.
well, I just figured out that "/mnt/c/libraries/lib1/include" means you should replace it with your library path. Now it works with such a configuration
{
"configurations": [
{
"name": "WSL",
"intelliSenseMode": "clang-x64",
"compilerPath": "/usr/bin/gcc",
"includePath": [
"${workspaceFolder}",
"/usr/include/llvm-6.0",
"/usr/include/llvm-c-6.0"
],
"defines": [],
"browse": {
"path": [
"${workspaceFolder}",
"/usr/include/llvm-6.0",
"/usr/include/llvm-c-6.0"
],
"limitSymbolsToIncludedHeaders": true,
"databaseFilename": ""
},
"cStandard": "c11",
"cppStandard": "c++17"
}
],
"version": 4
}
But I wonder why the soft link fails. I do make the soft link but it fails when I set the c_cpp_properties.json as
{
"configurations": [
{
"name": "WSL",
"intelliSenseMode": "clang-x64",
"compilerPath": "/usr/bin/gcc",
"includePath": [
"${workspaceFolder}",
"/usr/include/llvm",
"/usr/include/llvm-c"
],
"defines": [],
"browse": {
"path": [
"${workspaceFolder}",
"/usr/include/llvm",
"/usr/include/llvm-c"
],
"limitSymbolsToIncludedHeaders": true,
"databaseFilename": ""
},
"cStandard": "c11",
"cppStandard": "c++17"
}
],
"version": 4
}
Does it have something to do with https://github.com/Microsoft/WSL/issues/1475
It could. But we haven't done any testing of WSL symlinks in the Windows environment (where VS Code runs). We can use this issue to track that.
Oh, this is a bug with #include completion not treating symlinks as directories. We correctly resolve the symlinks in the includePath so the header is found by IntelliSense (no green squiggle), right?
Type: LanguageService
Describe the bug
To Reproduce Steps to reproduce the behavior: c_cpp_prperties.json
edit an C/C++ source code file and try to type this
Expected behavior show no error read lines and make correct intellisense
Screenshots
Additional context it seems that the extension do find the LLVM folder but somehow it cannot recognize it. I tried to make a soft link named "llvm" for "llvm-6.0" in /usr/include/ but it is useless.