-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Include file not found in include directory" when directories contain environment variables #87
Comments
Currently we are not expanding environment variables in includePath. Justin is looking at addressing the issue. |
The fix is in the next release, version 0.8.0. We will resolve:
|
Awesome ! Thanks for the quick reaction :) |
Version 1.4.0 |
What is your cpptools version? |
0.9.1 I'm using on 16.04 ubuntu, all standard header files are showing "Include file not found in include directory" thus no auto-complete on those standard functions, e.g: #include <stdio.h> will have green-wave-icons underneath and when mouse-over it it says ""Include file not found in include directory" |
@laoshaw , @Shivamnema05 can you share the includePath settings you are using? |
@sridmad How to get that setting ? |
it should be in c_cpp_properties.json under /path/to/the/root/folder/.VSCode. If the file is not there, see the section "Specifying Additional Include Directories for Better Symbol Support" at https://code.visualstudio.com/docs/languages/cpp |
{ |
I don't how. But my problem is fixed. |
If you run into this again please reopen (or create a new issue). |
Hi, I'm having the same problem. Except I'm using bash on windows. I'm getting the "Include file not found in include path" warning. I've tried adding the include path to both windows and linux settings: Here's the windows settings: Here's the linux settings: |
@AdityaPokharel You need to add include paths to the browse.path setting. We should probably change the error message to better explain this. Originally, there was just a single includePath, which functioned like the current browse.path, but now the includePath is supposed to match the compiler include path settings, and the browse.path is more like the symbol path setting and is recursive and is supposed to include source files too. |
I've got v 1.20.1 for Mac and am still experiencing this problem.
in both Can you give an example project layout and c_cpp_properties.json that will make this IDE happy? |
If you rename you c_cpp_properties.json to something else (e.g. c_cpp_properties.json-old) and then run the "Edit Configurations..." command again, the extension will attempt to generate a new file with the correct paths filled in to match your Mac. If won't have If you continue to have issues, please open a new issue so we can track it. This issue is closed. |
Hi,
I'm trying to make the switch to vscode for a c++ project with multiple contributors. The project is currently developed on windows and current bug was only tested on this platform.
Since we're more than one, we've set up environment variables pointing to where our libraries' include files are.
When trying to add "${ZENVIRONMENT_PATH}/include" to the includePath of the project, vscode gives a "Include file not found in include directory" message on all includes from said path. This happens whether the environment variable is a system or a user one.
Directly using the absolute path of the folder to add to includes fixes the problem, but isn't viable for me.
The text was updated successfully, but these errors were encountered: