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

Unable to use compilerPath \Microsoft Visual Studio 14.0\VC\BIN\cl.exe #8975

Closed
Clinkz24 opened this issue Mar 6, 2022 · 4 comments
Closed
Assignees
Labels
bug Feature: Configuration An issue related to configuring the extension or IntelliSense fixed Check the Milestone for the release in which the fix is or will be available. Language Service regression A bug that didn't exist in a previous release

Comments

@Clinkz24
Copy link

Clinkz24 commented Mar 6, 2022

Bug type: Language Service

Describe the bug

  • OS and Version: windows 10 19044.1526
  • VS Code Version: 1.65.0(user setup)
  • C/C++ Extension Version: 1.8.4
  • Other extensions you installed (and if the issue persists after disabling them):
  • If using SSH remote, specify OS of remote machine:
  • A clear and concise description of what the bug is, including information about the workspace (i.e. is the workspace a single project or multiple projects, size of the project, etc).

Steps to reproduce

  1. open project dir
  2. it is happen

Expected behavior

Code sample and logs

  • Code sample

  • Configurations in c_cpp_properties.json
    c_cpp_properties.json:

{
    "configurations": [
        {
            "name": "Win32",
            "defines": [
                "_DEBUG"
            ],
            "windowsSdkVersion": "10.0.10240.0",
            "cStandard": "c17",
            "cppStandard": "c++14",
            "intelliSenseMode": "msvc-x86",
            "compileCommands": ".vscode/compile_commands.json"
        }
    ],
    "version": 4
}

compile_commands.json:

[
{
  "directory": "D:\\workspace\\dev\\gitlab\\Iudge11Core\\iudge11core",
  "arguments": ["D:\\workspace\\soft\\visualstudio\\Microsoft Visual Studio 14.0\\VC\\BIN\\cl.exe", "/c", "/nologo", "/Zi", "/FS", "/Fdbuild\\windows\\x86\\debug\\compile.msclient.pdb", "/Od", "/ID:\\workspace\\pkgtest\\third\\tinyxml2.pkg\\v6.2.0\\inc", "/ID:\\workspace\\pkgtest\\third\\boost.pkg\\v1.68.0\\inc", "/ID:\\workspace\\pkgtest\\iudge\\icf.pkg\\v1.3.1\\inc", "/ID:\\workspace\\pkgtest\\iudge\\dmodule_itp.pkg\\v1.0.0\\inc", "/ID:\\workspace\\pkgtest\\third\\protobuf.pkg\\v3.6.1\\inc", "/ID:\\workspace\\pkgtest\\iudge\\iudge_netcore.pkg\\v1.3.0\\inc", "/ID:\\workspace\\pkgtest\\iudge\\iudge_utils.pkg\\v1.1.6\\inc", "/ID:\\workspace\\pkgtest\\third\\cryptopp.pkg\\v7.0.static\\inc", "/ID:\\workspace\\pkgtest\\third\\nlohmann_json.pkg\\v3.9.0\\inc", "/DMAINSERVER_API_EXPORT", "/DBOOST_ALL_DYN_LINK", "/EHsc", "/MDd", "/Fobuild\\.objs\\msclient\\windows\\x86\\debug\\msclient\\model\\enums.cpp.obj", "msclient\\model\\enums.cpp"],
  "file": "msclient\\model\\enums.cpp"
},
{
  "directory": "D:\\workspace\\dev\\gitlab\\Iudge11Core\\iudge11core",
  "arguments": ["D:\\workspace\\soft\\visualstudio\\Microsoft Visual Studio 14.0\\VC\\BIN\\cl.exe", "/c", "/nologo", "/Zi", "/FS", "/Fdbuild\\windows\\x86\\debug\\compile.msclient.pdb", "/Od", "/ID:\\workspace\\pkgtest\\third\\tinyxml2.pkg\\v6.2.0\\inc", "/ID:\\workspace\\pkgtest\\third\\boost.pkg\\v1.68.0\\inc", "/ID:\\workspace\\pkgtest\\iudge\\icf.pkg\\v1.3.1\\inc", "/ID:\\workspace\\pkgtest\\iudge\\dmodule_itp.pkg\\v1.0.0\\inc", "/ID:\\workspace\\pkgtest\\third\\protobuf.pkg\\v3.6.1\\inc", "/ID:\\workspace\\pkgtest\\iudge\\iudge_netcore.pkg\\v1.3.0\\inc", "/ID:\\workspace\\pkgtest\\iudge\\iudge_utils.pkg\\v1.1.6\\inc", "/ID:\\workspace\\pkgtest\\third\\cryptopp.pkg\\v7.0.static\\inc", "/ID:\\workspace\\pkgtest\\third\\nlohmann_json.pkg\\v3.9.0\\inc", "/DMAINSERVER_API_EXPORT", "/DBOOST_ALL_DYN_LINK", "/EHsc", "/MDd", "/Fobuild\\.objs\\msclient\\windows\\x86\\debug\\msclient\\model\\model_utils.cpp.obj", "msclient\\model\\model_utils.cpp"],
  "file": "msclient\\model\\model_utils.cpp"
},
{
  "directory": "D:\\workspace\\dev\\gitlab\\Iudge11Core\\iudge11core",
  "arguments": ["D:\\workspace\\soft\\visualstudio\\Microsoft Visual Studio 14.0\\VC\\BIN\\cl.exe", "/c", "/nologo", "/Zi", "/FS", "/Fdbuild\\windows\\x86\\debug\\compile.msclient.pdb", "/Od", "/ID:\\workspace\\pkgtest\\third\\tinyxml2.pkg\\v6.2.0\\inc", "/ID:\\workspace\\pkgtest\\third\\boost.pkg\\v1.68.0\\inc", "/ID:\\workspace\\pkgtest\\iudge\\icf.pkg\\v1.3.1\\inc", "/ID:\\workspace\\pkgtest\\iudge\\dmodule_itp.pkg\\v1.0.0\\inc", "/ID:\\workspace\\pkgtest\\third\\protobuf.pkg\\v3.6.1\\inc", "/ID:\\workspace\\pkgtest\\iudge\\iudge_netcore.pkg\\v1.3.0\\inc", "/ID:\\workspace\\pkgtest\\iudge\\iudge_utils.pkg\\v1.1.6\\inc", "/ID:\\workspace\\pkgtest\\third\\cryptopp.pkg\\v7.0.static\\inc", "/ID:\\workspace\\pkgtest\\third\\nlohmann_json.pkg\\v3.9.0\\inc", "/DMAINSERVER_API_EXPORT", "/DBOOST_ALL_DYN_LINK", "/EHsc", "/MDd", "/Fobuild\\.objs\\msclient\\windows\\x86\\debug\\msclient\\model\\msg_apply_security.cpp.obj", "msclient\\model\\msg_apply_security.cpp"],
  "file": "msclient\\model\\msg_apply_security.cpp"
}]
  • Logs from running C/C++: Log Diagnostics from the VS Code command palette
Version: 1.8.4
Current Configuration:
{
    "name": "Win32",
    "defines": [
        "_DEBUG"
    ],
    "windowsSdkVersion": "10.0.10240.0",
    "cStandard": "c17",
    "cppStandard": "c++14",
    "intelliSenseMode": "msvc-x86",
    "compileCommands": ".vscode/compile_commands.json",
    "compilerPathIsExplicit": false,
    "cStandardIsExplicit": true,
    "cppStandardIsExplicit": true,
    "intelliSenseModeIsExplicit": true,
    "compilerArgs": [],
    "mergeConfigurations": false,
    "browse": {
        "limitSymbolsToIncludedHeaders": true
    }
}
Translation Unit Mappings:
[ D:\workspace\dev\gitlab\Iudge11Core\iudge11core\clientcore\view\view_deposit.cpp ]:
    D:\workspace\dev\gitlab\Iudge11Core\iudge11core\clientcore\view\view_deposit.cpp
Translation Unit Configurations:
[ D:\workspace\dev\gitlab\Iudge11Core\iudge11core\clientcore\view\view_deposit.cpp ]:
    Process ID: 14484
    Memory Usage: 341 MB
    Includes:
        D:\WORKSPACE\PKGTEST\IUDGE\DC_ACCESS.PKG\V1.2.1\INC
        D:\WORKSPACE\PKGTEST\IUDGE\DMODULE_QUOTES.PKG\V1.0.0\INC
        D:\WORKSPACE\PKGTEST\THIRD\WEBSOCKETPP.PKG\V0.8.2\INC
        D:\WORKSPACE\PKGTEST\IUDGE\IUDGE_LOGER.PKG\V1.0.0\INC
        D:\WORKSPACE\PKGTEST\THIRD\TINYXML2.PKG\V6.2.0\INC
        D:\WORKSPACE\PKGTEST\THIRD\BOOST.PKG\V1.68.0\INC
        D:\WORKSPACE\PKGTEST\IUDGE\ICF.PKG\V1.3.1\INC
        D:\WORKSPACE\PKGTEST\IUDGE\DMODULE_ITP.PKG\V1.0.0\INC
        D:\WORKSPACE\PKGTEST\THIRD\PROTOBUF.PKG\V3.6.1\INC
        D:\WORKSPACE\PKGTEST\IUDGE\IUDGE_NETCORE.PKG\V1.3.0\INC
        D:\WORKSPACE\PKGTEST\IUDGE\IUDGE_UTILS.PKG\V1.1.6\INC
        D:\WORKSPACE\PKGTEST\THIRD\CRYPTOPP.PKG\V7.0.STATIC\INC
        D:\WORKSPACE\PKGTEST\THIRD\NLOHMANN_JSON.PKG\V3.9.0\INC
    Defines:
        WSTYPE_EXE
        BOOST_ALL_DYN_LINK
    Standard Version: ms_c++14
    IntelliSense Mode: windows-msvc-x86
    compile_commands.json entry:
        directory: D:\workspace\dev\gitlab\Iudge11Core\iudge11core
        file: clientcore\view\view_deposit.cpp
        arguments:
            D:\workspace\soft\visualstudio\Microsoft Visual Studio 14.0\VC\BIN\cl.exe
            /c
            /nologo
            /Zi
            /FS
            /Fdbuild\windows\x86\debug\compile.Iudge11Core.pdb
            /Od
            /ID:\workspace\pkgtest\iudge\dc_access.pkg\v1.2.1\inc
            /ID:\workspace\pkgtest\iudge\dmodule_quotes.pkg\v1.0.0\inc
            /ID:\workspace\pkgtest\third\websocketpp.pkg\v0.8.2\inc
            /ID:\workspace\pkgtest\iudge\iudge_loger.pkg\v1.0.0\inc
            /ID:\workspace\pkgtest\third\tinyxml2.pkg\v6.2.0\inc
            /ID:\workspace\pkgtest\third\boost.pkg\v1.68.0\inc
            /ID:\workspace\pkgtest\iudge\icf.pkg\v1.3.1\inc
            /ID:\workspace\pkgtest\iudge\dmodule_itp.pkg\v1.0.0\inc
            /ID:\workspace\pkgtest\third\protobuf.pkg\v3.6.1\inc
            /ID:\workspace\pkgtest\iudge\iudge_netcore.pkg\v1.3.0\inc
            /ID:\workspace\pkgtest\iudge\iudge_utils.pkg\v1.1.6\inc
            /ID:\workspace\pkgtest\third\cryptopp.pkg\v7.0.static\inc
            /ID:\workspace\pkgtest\third\nlohmann_json.pkg\v3.9.0\inc
            /DWSTYPE_EXE
            /DBOOST_ALL_DYN_LINK
            /EHsc
            /MDd
            /Fobuild\.objs\Iudge11Core\windows\x86\debug\clientcore\view\view_deposit.cpp.obj
            clientcore\view\view_deposit.cpp
Total Memory Usage: 341 MB
Browse Paths from compile_commands.json, from workspace folder: D:\workspace\dev\gitlab\Iudge11Core\iudge11core
    D:\WORKSPACE\DEV\GITLAB\IUDGE11CORE\IUDGE11CORE\CLIENTCORE\MAINCENTER
    D:\WORKSPACE\DEV\GITLAB\IUDGE11CORE\IUDGE11CORE\CLIENTCORE\MODEL
    D:\WORKSPACE\DEV\GITLAB\IUDGE11CORE\IUDGE11CORE\CLIENTCORE\QUOTES
    D:\WORKSPACE\DEV\GITLAB\IUDGE11CORE\IUDGE11CORE\CLIENTCORE\VIEW
    D:\WORKSPACE\DEV\GITLAB\IUDGE11CORE\IUDGE11CORE\CLIENTCORE\WSCORE
    D:\WORKSPACE\DEV\GITLAB\IUDGE11CORE\IUDGE11CORE\MSCLIENT\MODEL
    D:\WORKSPACE\DEV\GITLAB\IUDGE11CORE\IUDGE11CORE\MSCLIENT\SRC
    D:\WORKSPACE\DEV\GITLAB\IUDGE11CORE\IUDGE11CORE\TESTS\MAINSERVERCLIENT\SRC
    D:\WORKSPACE\PKGTEST\IUDGE\DC_ACCESS.PKG\V1.2.1\INC
    D:\WORKSPACE\PKGTEST\IUDGE\DMODULE_ITP.PKG\V1.0.0\INC
    D:\WORKSPACE\PKGTEST\IUDGE\DMODULE_QUOTES.PKG\V1.0.0\INC
    D:\WORKSPACE\PKGTEST\IUDGE\ICF.PKG\V1.3.1\INC
    D:\WORKSPACE\PKGTEST\IUDGE\IUDGE_LOGER.PKG\V1.0.0\INC
    D:\WORKSPACE\PKGTEST\IUDGE\IUDGE_NETCORE.PKG\V1.3.0\INC
    D:\WORKSPACE\PKGTEST\IUDGE\IUDGE_UTILS.PKG\V1.1.6\INC
    D:\WORKSPACE\PKGTEST\THIRD\BOOST.PKG\V1.68.0\INC
    D:\WORKSPACE\PKGTEST\THIRD\CRYPTOPP.PKG\V7.0.STATIC\INC
    D:\WORKSPACE\PKGTEST\THIRD\NLOHMANN_JSON.PKG\V3.9.0\INC
    D:\WORKSPACE\PKGTEST\THIRD\PROTOBUF.PKG\V3.6.1\INC
    D:\WORKSPACE\PKGTEST\THIRD\TINYXML2.PKG\V6.2.0\INC
    D:\WORKSPACE\PKGTEST\THIRD\WEBSOCKETPP.PKG\V0.8.2\INC

------- Workspace parsing diagnostics -------
Number of files discovered (not excluded): 14445
Number of files parsed: 4005

Screenshots

image
image
image

Additional context
work fine in 1.5.1。

@michelleangela michelleangela changed the title Unable to use compilerPath Unable to use compilerPath Microsoft Visual Studio 14.0\VC\BIN\cl.exe Mar 7, 2022
@michelleangela michelleangela changed the title Unable to use compilerPath Microsoft Visual Studio 14.0\VC\BIN\cl.exe Unable to use compilerPath \Microsoft Visual Studio 14.0\VC\BIN\cl.exe Mar 7, 2022
@michelleangela michelleangela added Feature: Configuration An issue related to configuring the extension or IntelliSense Language Service regression A bug that didn't exist in a previous release labels Mar 7, 2022
@michelleangela michelleangela added this to the 1.10 milestone Mar 7, 2022
@Colengms
Copy link
Contributor

Colengms commented Mar 8, 2022

Hi @Clinkz24 . Could you confirm whether D:\\workspace\\soft\\visualstudio refers to a directory you have checked into a repro, or whether you have run the Visual Studio installer to install VS at that location?

Also, can you provide the path to your C/C++ system headers?

The C/C++ extension assumes that Visual Studio was installed by the installer, and uses a registry key to locate system headers. If that fails, it will search for header files at certain relative locations to cl.exe (likely based on where more recent versions of VS put them). If both of these approaches fail, you will get the warning you are seeing.

If this is occurring with an instance of VS 2015 installed via the VS installer, this would be a bug in the C/C++ extension. But, if you have checked in Visual Studio to a repro instead of installing it, that is not generally something we support. If you could let us know where the include paths are, relative to cl.exe, we could potentially address this by adding that relative path to our list of paths to check.

@Colengms Colengms added more info needed The issue report is not actionable in its current state and removed bug labels Mar 8, 2022
@Clinkz24
Copy link
Author

Clinkz24 commented Mar 8, 2022

cl.exe:
image
C/C++ system headers:
image

I have never changed the VS installation directory.And I can compile my project normally with my build script.
I'm confused because it is look work fine with 1.5.1, but other version not.

@Colengms Colengms self-assigned this Mar 9, 2022
@Colengms Colengms added bug and removed more info needed The issue report is not actionable in its current state labels Mar 9, 2022
@Colengms Colengms modified the milestones: 1.10, 1.9.3 (insiders3) Mar 9, 2022
@sean-mcmanus sean-mcmanus added the fixed Check the Milestone for the release in which the fix is or will be available. label Mar 9, 2022
@Colengms
Copy link
Contributor

Hi @Clinkz24 . I believe this should be fixed in 1.9.3 (prerelease). Could you try it out, and let us know? If you're still seeing an issue, we can reactivate this issue.

@Clinkz24
Copy link
Author

yes,it is work fine.
thanks a lot 😁😁😁

@github-actions github-actions bot locked and limited conversation to collaborators Apr 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Feature: Configuration An issue related to configuring the extension or IntelliSense fixed Check the Milestone for the release in which the fix is or will be available. Language Service regression A bug that didn't exist in a previous release
Projects
None yet
Development

No branches or pull requests

4 participants