Skip to content

Warning: Path is not a file: AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState\rootfs\usr\bin\gcc, despite IntelliSense working #3825

@fefrei

Description

@fefrei

Type: LanguageService

Describe the bug

  • OS and Version: Windows 10 1903
  • VS Code Version: 1.35.1
  • C/C++ Extension Version: 0.23.1
  • Other extensions you installed (and if the issue persists after disabling them): None

I'm getting this warning when trying to set "compilerPath": "/usr/bin/gcc":

Path is not a file: "C:\Users\felix\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState\rootfs\usr\bin\gcc".

The warning is actually incorrect: This file exists, and IntelliSense works fine. If I remove "compilerPath": "/usr/bin/gcc" from my configuration, IntelliSense no longer works, and I get build errors, so the configuration is used despite this warning.

To Reproduce

I'm pretty sure these steps don't suffice, but here's what I did:

  1. Install Ubuntu through WSL.
  2. Create this c_cpp_properties.json:
    {
        "configurations": [
            {
                "name": "tool",
                "defines": [],
                "compilerPath": "/usr/bin/gcc",
                "cStandard": "c11",
                "cppStandard": "c++17",
                "intelliSenseMode": "gcc-x64"
            }
        ],
        "version": 4
    }
    

That's it.

Screenshots

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Feature: ConfigurationAn issue related to configuring the extension or IntelliSenseLanguage Servicebughelp wantedCan be fixed in the public (open source) repo.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions