Skip to content
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

Add config squiggles for mismatching compilerPath vs intelliSenseMode #2983

Closed
evakili opened this issue Dec 30, 2018 · 4 comments
Closed

Add config squiggles for mismatching compilerPath vs intelliSenseMode #2983

evakili opened this issue Dec 30, 2018 · 4 comments
Assignees
Labels
Feature Request fixed Check the Milestone for the release in which the fix is or will be available. Language Service
Milestone

Comments

@evakili
Copy link

evakili commented Dec 30, 2018

I've set compilerPath to VC++ 2017 location, but always "Goto Definition" went to WSL header files.
Setting compilerPath to MinGW or WSL works fine (correct headers are identified).

Extension version: 0.20.1
VS Code version: Code 1.30.1 (dea8705087adb1b5e5ae1d9123278e178656186a, 2018-12-18T18:12:07.165Z)
OS version: Windows_NT x64 10.0.17763

@sean-mcmanus
Copy link
Collaborator

Can you enable Debug logging and check if the WSL versus MSVC header paths are being used? It's possible something is causing the cl.exe to not be used and it's falling back to the WSL stuff.

@sean-mcmanus sean-mcmanus added Language Service more info needed The issue report is not actionable in its current state labels Dec 31, 2018
@evakili
Copy link
Author

evakili commented Jan 1, 2019

Yes. WSL header paths are used. Here is the log:

initialized
workspace/didChangeConfiguration
IntelliSense Engine = Default.
The extension will use the Tag Parser for IntelliSense when #includes don't resolve.
Autocomplete is enabled.
Error squiggles are enabled.
File exclude: **/.git
File exclude: **/.svn
File exclude: **/.hg
File exclude: **/CVS
File exclude: **/.DS_Store
File exclude: **/.vscode
Search exclude: **/node_modules
Search exclude: **/bower_components
Search exclude: **/.vscode
cpptools/queryCompilerDefaults
Attempting to get defaults from compiler found on the machine: ''
Attempting to get defaults from compiler found on the machine: /usr/bin/gcc
Failed to spawn process. Error: 2 (The system cannot find the file specified.)
cpptools/didChangeFolderSettings
Attempting to get defaults from compiler found on the machine: /usr/bin/gcc
Code browsing service initialized
Attempting to get defaults from compiler found on the machine: /usr/bin/gcc
  Folder: D:/tools/wsl/debian/rootfs/usr/lib/gcc/x86_64-linux-gnu/6/include/ will be indexed
  Folder: D:/tools/wsl/debian/rootfs/usr/local/include/ will be indexed
  Folder: D:/tools/wsl/debian/rootfs/usr/lib/gcc/x86_64-linux-gnu/6/include-fixed/ will be indexed
  Folder: D:/tools/wsl/debian/rootfs/usr/include/ will be indexed
  Folder: D:/testvscode/ will be indexed
Discovering files...
  Processing folder (recursive): D:/tools/wsl/debian/rootfs/usr/lib/gcc/x86_64-linux-gnu/6/include/
  Processing folder (recursive): D:/tools/wsl/debian/rootfs/usr/local/include/
  Processing folder (recursive): D:/tools/wsl/debian/rootfs/usr/lib/gcc/x86_64-linux-gnu/6/include-fixed/
  Processing folder (recursive): D:/tools/wsl/debian/rootfs/usr/include/
  Processing folder (recursive): D:/testvscode/
  Discovering files: 22899 file(s) processed
  0 file(s) removed from database
Done discovering files.
Populate include completion cache.
Parsing remaining files...
  tag parsing file: D:\testvscode\main.cpp
  Parsing: 1 files(s) processed
Done parsing remaining files.
Database safe to open

Here is c_cpp_properties.json:

{
    "configurations": [
        {
            "name": "Visual C++",
            "includePath": [
                "${workspaceFolder}/**"
            ],
            "defines": [
                "_DEBUG",
                "UNICODE",
                "_UNICODE"
            ],
            "compilerPath": "D:\\tools\\vs\\2017\\VC\\Tools\\MSVC\\14.16.27023\\bin\\Hostx86\\x86\\cl.exe",
            "cStandard": "c11",
            "cppStandard": "c++17",
            "intelliSenseMode": "clang-x64"
        }
    ],
    "version": 4
}

@evakili evakili closed this as completed Jan 1, 2019
@evakili evakili reopened this Jan 1, 2019
@sean-mcmanus
Copy link
Collaborator

It's caused by your intelliSenseMode being "clang-x64" -- can you change it to msvc-x64? We could improve the experience to make it less confusing later.

@sean-mcmanus sean-mcmanus added bug Feature Request and removed more info needed The issue report is not actionable in its current state labels Jan 2, 2019
@sean-mcmanus sean-mcmanus added this to the Triage milestone Jan 3, 2019
@evakili
Copy link
Author

evakili commented Jan 6, 2019

Thanks @sean-mcmanus! msvc-x64 solves the problem. But I'm pretty sure that it is not documented so!

@bobbrow bobbrow removed the bug label Mar 21, 2019
@bobbrow bobbrow modified the milestones: Triage, April 2019 Mar 21, 2019
@bobbrow bobbrow changed the title Visual C++ and SDK headers did not found, even with compilerPath set to cl.exe location Add config squiggles for mismatching compilerPath vs intelliSenseMode Mar 21, 2019
@sean-mcmanus sean-mcmanus self-assigned this Mar 29, 2019
@sean-mcmanus sean-mcmanus added the fixed Check the Milestone for the release in which the fix is or will be available. label Apr 19, 2019
@github-actions github-actions bot locked and limited conversation to collaborators Oct 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Feature Request fixed Check the Milestone for the release in which the fix is or will be available. Language Service
Projects
None yet
Development

No branches or pull requests

4 participants