vscode-clang
vscode-clang copied to clipboard
“'fileName' file not found"
VSCode Version: 1.5.2 OS Version: 7
Steps to Reproduce:
- Set up VSCode, C/C++ package, g++, Clang and GDB hopefully correctly.
- Include some file.
See http://stackoverflow.com/questions/39512079/vscode-filename-not-found.
See Microsoft/vscode#12151 and https://github.com/Microsoft/vscode-cpptools/issues/234.

https://github.com/Microsoft/vscode-cpptools/issues/234 You installed to much extensions provide the same functionality I think.
- C++ Intellisense&C/C++ Clang&C/C++ provide autocomplete
- C/C++&Native Debug provide debug UI
for this Issue
you may need add c/c++ clang config to your user config or workspace config open these config file:
- press F1 and type "settings" then you can see "open : user settings" and "open : workspace settings;
- chose workspace settings or user settings
- add some line of config like this:
"clang.executable": "clang",
"clang.completion.enable": true,
"clang.cxxflags": [
"-std=c++11",
"-I/your/CPP/include/path1",
"-I/your/CPP/include/path2"
],
"clang.cflags": [
"-std=c99",
"-Ic:/your/C/include/path1",
"-Ic:/your/C/include/path2"
],
Hope that I can help you
Maybe it seems too much, but when VSCode recommended the extensions for me and told me, that IntelliSense isn't working in this version, I installed those extensions just to use VSCode correctly, but it's hard for me to set up the environment.
Adding
"clang.cxxflags": [ "-std=c++14", "-IC:/cygwin64/usr/local/include/c++" ]
didn't solve it, the other settings except the "clang.cflags" were already as default and I don't see a reason to use "clang.cflags" on C++ code, so I didn't use it.

have you try to use this in your cmd?
clang++ -std=c++14 -IC:/cygwin64/usr/local/include/c++
tell me if there is an error like this
fatal error : "file_name.h" file not found
if clang drop an error
you can use
g++ -M test.cpp
to show your include directory
if there is no error message
maybe other plugin report this error :)
In the end, I was missing features in VSCode for C++ like showing all uses of specific variable/function and refactoring them, that I switched back to Visual Studio, sorry.
Thanks a lot @San0from. I was having the same issue and this fixed it for me.