-
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
cpptools seems not to be receiving compiler path from CMake Tools #3819
Comments
There is a compilerPath path property in our vscode-cpptool-api that the CMake Tools extension could set, but it may not be set -- you can check if it's being set or not via enabling debug logging. If they don't set it, then it could a bug with the CMake Tools extension. I believe setting the compilerPath yourself will work because we don't use that if a custom configuration provider is being used. |
Thanks for your reply. I have created an issue in the CMake Tools repo: microsoft/vscode-cmake-tools#702. Actually, I'm not sure that CMake Tools isn't providing the correct compilerPath. The cpptools debug output does not appear to show it. What I do know from the cpptools debug info is that the browse path is set to the g++ 4.8.2 header files (as shown in the output shown in the above CMake Tools issue). I don't know where g++ 7.3.1 from devtoolset 7 gets its include files. Would it use the 4.8.2 files? If not where are they? This would enable me to manually set the cpptools browse path. Sorry, that this is not an appropriate question for cpptools issues, but if you have any thoughts I would be grateful. |
Update: I have identified devtoolset 7's include paths:
So I tried adding these to settings.json:
But cpptools is still assuming gcc 4.8.2: |
It looks like the configuration provider is not being used at all (for compilerPath or anything else like includePath). It seems like we need to investigate how this could happen and/or add more logging in regards to what is failing. |
@sean-mcmanus Thanks for looking into this. |
We added more logging that would help us diagnose the issue. If you are still seeing this problem, could you run the "Log Diagnostics" command and share with us what you see? |
This issue has been closed automatically because it needs more information and has not had recent activity. |
Type: LanguageService
I am running a remote session over SSH to a Centos 7.6 machine. Centos 7.6 has gcc 4.8 by default, which doesn't support C++14, so I have installed the RHEL Developer Toolset 7 to give gcc 7.3.1 to support C++14.
I've set env variable:
and CMake (and vscode-cmake-tools extension) adopts that version as the default compiler:
gives:
but my source code has:
and I get a red squiggle:
The workspaces settings.json contains:
Should vscode-cmake-tools provide the compiler path to the cpptools or do I need to specify it separately in cpptools settings?
The text was updated successfully, but these errors were encountered: