-
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
Errors shown on includes from MIPS g++ cross-compiler #5113
Comments
The extension does not fully support IntelliSense for MIPS, but could you try manually querying the compiler again with the arguments Could you also share the logs from the language server and compile_commands.json?
The extension will always try to query a default compiler regardless if there is a different compiler path specified. It will only use the info from the default compiler if it fails to get info from a specified compiler. |
Sure, the output below: compiler output
Where can I find log from the language server? In the meantime I share just one entry from compile_commands.json (they are all the same):
Thank you. |
Thanks for the additional info. The extension should have been able to parse the compiler output. Perhaps the language server logs can provide more clues. You can get logs from the language server from instructions at https://code.visualstudio.com/docs/cpp/enable-logging-cpp#_enable-logging-for-the-language-server. |
Ah, if you mean C_cpp logging level I already have Debug set in my settings. You can find the logs in my first post :) |
Can you provide the logging from C/C++: Log Diagnostics with the current C++ file active? |
Are you using a workspace or just a folder? There's a known bug with settings being incorrect: #5134 |
I am using just a folder. Here is the log of the current C++ file: C/C++ Log
When I go over an include with the squiggle (see screenshots in the first post), I see the following log: When I Ctrl-click on the include, the correct file is opened (see always screenshot in the first post). |
UPDATE: I see that if I Ctrl-click on By looking into the filesystem, I think that the correct
where the path:
is exactly what I see into
I'm not sure if all these infos are somehow useful. |
@gentooise The Could you try the following workaround? Try to add the path of
Note: the order of the non-recursive paths matters |
Update on root cause: I see from the logs that the sysroot path You can try adding |
Go to Def on So you appear to be setup good. |
Thank you! Didn't know of this existing issue. For now I think I can survive with it (as long as I know which is the correct included file) :)
Yes, for me is ok I think, thanks. Only the following potential issues remain (don't know if you want to track them):
for now this does not seem to cause particular issues with
|
UPDATE: I found another issue (with the same configuration and all). Basically I see strange errors on C++ standard includes, and if I go down in the includes (Go to Def), all comes down to this: But both
It is very strange :/ UPDATE2: I found the issue, there were other two paths missing from systemIncludePath:
Or may I use this?
Both work for now, I think the only difference is if I want to select only specific folders and/or decide their relative ordering :) So, only the open points in my previous comment remain. |
Is your compilerPath set to ""? The system includes can get reordered if they match system includes returned by the queried compiler. Usage of |
My configuration is this one now:
|
Is that configuration working for you? If not, what's the issue? Is there still unwanted includePath reordering occurring? |
The problem is that the situation is not quite repeatable... include error squiggles sometimes come back. Also, even if I set
Is it possible that the compilerPath is filled in by CMake Tools anyway? @sean-mcmanus Anyway, it seems that no include reordering occurs now, both with and without compilerPath. |
Yes, CMake Tools will send us a compilerPath as part of the info we receive from them. You can see that data in the logging after "Custom configurations received". |
@gentooise Are you still seeing this issue? Some improvements have been made since you opened the issue. Using the latest version (currently 1.1.0-insiders4), there should be more detail in the log regarding compiler probing and configuration. |
This issue has been closed automatically because it needs more information and has not had recent activity. |
Type: LanguageService
Describe the bug
Steps to reproduce
I have only this settings.json:
When starting VSCode, the include path of the cross compiler is correctly indexed but I see two main problems:
Expected behavior
Cpp extension correctly queries the compiler given in settings.json.
Logs
Screenshots
Also, if I Ctrl-click on
![image](https://user-images.githubusercontent.com/1735060/76635900-74367c80-6548-11ea-8cd2-c2bffa3704c3.png)
<stdint.h>
, the correct file is opened and I see this:Additional context
I can correctly query the compiler manually:
Command
The text was updated successfully, but these errors were encountered: