-
Notifications
You must be signed in to change notification settings - Fork 59
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
headers from pch are not recognized inside project #2040
Comments
The workaround I suggested in #2034 was:
i.e. to add The same applies to |
Okey, and why this workaround needs to be performed? Isn't it correct use of pch to include them only in .cpp inplementation of the header file? |
Like I've said in the other issue, not supporting files which are not self-contained is a known limitation of clangd, tracked in #45. |
So basically, I can't use clangd with pch? |
Adding When the compiler encounters the |
Ok, the last question. If I get it wright, I have to include my pch file in all header files that needs to use standard library? |
The general principle is, until #45 is implemented, any file that you open for editing with clangd needs to be self-contained. That means that for any symbol used in the file (for example, In this example project, including the PCH header in headers like |
Ok, thank you for help |
As I mentioned in #2034 (comment) I have big problem with pch in my project. As it was suggested, adding
Expect.hpp
to pch file was my mistake so I removed it but the error still occur. The same problem is present inMatrix.hpp
.Strange thing that I realized is the fact that there are no such errors with internal include files added to pch. The problem seems to occur only for std library
The text was updated successfully, but these errors were encountered: