Skip to content

warning "Unable to resolve configuration with compilerPath "...rc.exe". Using "cl.exe" instead." #6559

Description

Type: LanguageService

A new unexpected warning appears in its own dedicated output window/tab "c/c++ configuration warnings"

[11/20/2020, 9:19:13 PM] Unable to resolve configuration with compilerPath "C:\PROGRA~2\WI3CF2~1\10\bin\100171~1.0\x64\rc.exe".  Using "cl.exe" instead.

That path in the warning does exist and I can use that exact path at a CMD prompt and it does run the RC compiler. I have no idea what this warning is warning me about and I have yet seen any side affects.

Describe the bug

  • OS and Version: Microsoft Windows [Version 10.0.19042.630]
  • VS Code Version: 1.51.1 (system setup)
  • C/C++ Extension Version: v1.1.2
  • Other extensions you installed (and if the issue persists after disabling them): reproduces with only enabled: c/c++, cmake tools
  • Does this issue involve using SSH remote to run the extension on a remote machine?: no

This new warning appears in its own dedicated output window/tab "c/c++ configuration warnings". The new warning appears within the last two weeks. During that time I did update VS Studio 2019 to version 16.8.0 and then 16.8.2. VSCode itself or the c++ extension might have auto updated itself.

No workspace other than this single folder. It is a cmake project. When I open vscode to that project folder, this tab/window opens and I see this warning.

Steps to reproduce

  1. Open VSCode to the project folder

Result

A tab/window opens "c/c++ configuration warnings" and a warning appears in it

[11/20/2020, 9:19:13 PM] Unable to resolve configuration with compilerPath "C:\PROGRA~2\WI3CF2~1\10\bin\100171~1.0\x64\rc.exe".  Using "cl.exe" instead.

Expected

No tab window. No warning. No side affects.

More info

c_cpp_properties.json

{
    "configurations": [
        {
            "name": "Win32",
            "intelliSenseMode": "msvc-x64",
            "configurationProvider": "ms-vscode.cmake-tools",
            "compileCommands": "${workspaceFolder}/build/compile_commands.json",
            "includePath": [
                "${workspaceFolder}/**"
            ],
            "defines": [
                "_DEBUG",
                "UNICODE",
                "_UNICODE",
                "RC_INVOKED"
            ],
            "windowsSdkVersion": "10.0.17134.0",
            "cStandard": "c11",
            "cppStandard": "c++17"
        }
    ],
    "version": 4
}

folder's settings.json

Notice the files.associations setting. Perhaps a recent change to the extension is surfacing a warning that was not before.

{
    "terminal.integrated.shell.windows": "C:\\Windows\\System32\\cmd.exe",
    "cmake.configureOnOpen": false,
    "cmake.configureSettings":{
        "CMAKE_VERBOSE_MAKEFILE": "ON"
    },
    "cmake.parseBuildDiagnostics": true,
    "C_Cpp.default.configurationProvider": "vector-of-bool.cmake-tools",
    "C_Cpp.default.intelliSenseMode": "msvc-x64",
    "C_Cpp.default.windowsSdkVersion": "8.1",
    "C_Cpp.default.cStandard": "c11",
    "C_Cpp.default.cppStandard": "c++17",
    "C_Cpp.default.compileCommands": "${workspaceFolder}/build/compile_commands.json",
    "C_Cpp.default.includePath": [
        "${workspaceFolder}",
        "${workspaceFolder}/build"
    ],
    "C_Cpp.default.defines": [
        "RC_INVOKED"
    ],
    "C_Cpp.vcpkg.enabled": true,
    "files.associations": {
        "*.rc": "cpp",
        "*.rc.in": "cpp"
    },
    "C_Cpp.loggingLevel": "Debug"
}

Logs

Some of the logs are redacted. Please contact me in this issue or email if you want the full content.

C/C++: Log Diagnostics
-------- Diagnostics - 11/20/2020, 10:31:25 PM
Version: 1.1.2
Current Configuration:
{
    "name": "Win32",
    "intelliSenseMode": "msvc-x64",
    "configurationProvider": "ms-vscode.cmake-tools",
    "compileCommands": "${workspaceFolder}/build/compile_commands.json",
    "includePath": [
        "${workspaceFolder}/**"
    ],
    "defines": [
        "_DEBUG",
        "UNICODE",
        "_UNICODE",
        "RC_INVOKED"
    ],
    "windowsSdkVersion": "10.0.17134.0",
    "cStandard": "c11",
    "cppStandard": "c++17",
    "compilerArgs": [],
    "intelliSenseModeIsExplicit": true,
    "cStandardIsExplicit": true,
    "cppStandardIsExplicit": true,
    "compilerPathIsExplicit": true,
    "browse": {
        "path": [
            "${workspaceFolder}/**"
        ],
        "limitSymbolsToIncludedHeaders": true
    }
}
Custom browse configuration: 
{
    "browsePath": [
...redacted...
    ],
    "standard": "c++17",
    "compilerPath": "c:/program files (x86)/microsoft visual studio/2019/community/vc/tools/msvc/14.28.29333/bin/hostx64/x64/cl.exe",
    "compilerArgs": [
        "-DWIN32",
        "/DWIN32",
        "/D_WINDOWS",
        "/GR",
        "/EHsc",
        "/O2",
        "/Ob2",
        "/DNDEBUG",
        "-MD",
        "/GL",
        "/W4",
        "/wd4200",
        "/WX",
        "/ZH:SHA_256",
        "/utf-8",
        "/Y-",
        "/arch:AVX",
        "/fp:fast",
        "/Qpar-report:1",
        "/Qvec-report:1",
        "/guard:cf",
        "/GS-",
        "/Gw",
        "/QIntel-jcc-erratum",
        "-std:c++17"
    ]
}
Translation Unit Mappings:
...redacted...
Translation Unit Configurations:
...redacted...
------- Workspace parsing diagnostics -------
Number of folders and files enumerated: 17586
Number of files discovered (not excluded): 14185
Language Server logs
Custom browse configuration received: {
  "browsePath": [
     ...redacted...
  ],
  "standard": "c++17",
  "compilerPath": "c:/program files (x86)/microsoft visual studio/2019/community/vc/tools/msvc/14.28.29333/bin/hostx64/x64/cl.exe",
  "compilerArgs": [
    "-DWIN32",
    "/DWIN32",
    "/D_WINDOWS",
    "/GR",
    "/EHsc",
    "/O2",
    "/Ob2",
    "/DNDEBUG",
    "-MD",
    "/GL",
    "/W4",
    "/wd4200",
    "/WX",
    "/ZH:SHA_256",
    "/utf-8",
    "/Y-",
    "/arch:AVX",
    "/fp:fast",
    "/Qpar-report:1",
    "/Qvec-report:1",
    "/guard:cf",
    "/GS-",
    "/Gw",
    "/QIntel-jcc-erratum",
    "-std:c++17"
  ]
}
cpptools/didChangeCppProperties
MSVC intelliSenseMode specified.  Configuring for compiler cl.exe.
Code browsing service initialized
MSVC intelliSenseMode specified.  Configuring for compiler cl.exe.
Attempting to get defaults from C++ compiler in compile_commands.json file: 'C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1428~1.293\bin\Hostx64\x64\cl.exe'
Attempting to get defaults from C++ compiler in compile_commands.json file: 'C:\PROGRA~2\WI3CF2~1\10\bin\100171~1.0\x64\rc.exe'
Probing compiler for default C language standard using command line: "C:\PROGRA~2\WI3CF2~1\10\bin\100171~1.0\x64\rc.exe" -x c -E -dM nul
Probing compiler for default C++ language standard using command line: "C:\PROGRA~2\WI3CF2~1\10\bin\100171~1.0\x64\rc.exe" -x c++ -E -dM nul
Probing compiler's default target using command line: "C:\PROGRA~2\WI3CF2~1\10\bin\100171~1.0\x64\rc.exe" -dumpmachine
Unhandled default compiler target value detected: 
Compiler probe command line: "C:\PROGRA~2\WI3CF2~1\10\bin\100171~1.0\x64\rc.exe" /fo CMakeFiles\redacted.dir\version.rc.res -std=c++17 -Wp,-v -E -dD -x c++ -m64  nul
Failed to query compiler. Falling back to 32-bit intelliSenseMode.
Compiler probe command line: "C:\PROGRA~2\WI3CF2~1\10\bin\100171~1.0\x64\rc.exe" /fo CMakeFiles\redacted.dir\version.rc.res -std=c++17 -Wp,-v -E -dD -x c++ -m32  nul
Failed to query compiler. Falling back to no bitness.
Compiler probe command line: "C:\PROGRA~2\WI3CF2~1\10\bin\100171~1.0\x64\rc.exe" /fo CMakeFiles\redacted.dir\version.rc.res -std=c++17 -Wp,-v -E -dD -x c++   nul

MSVC intelliSenseMode specified.  Configuring for compiler cl.exe.
Attempting...

Metadata

Metadata

Labels

Feature: ConfigurationAn issue related to configuring the extension or IntelliSenseLanguage Servicemore info neededThe issue report is not actionable in its current state

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions