【问题标题】:includePath in VSCode w/ MSYS2带有 MSYS2 的 VSCode 中的 includePath
【发布时间】:2018-06-23 23:46:38
【问题描述】:

尽我所能,我根本无法让 VSCode 找到我在 includePath 和 browse->path 中指定的任何标头。这是我的 c_cpp_properties.json 文件。当然,VSCode 应该能够在此之后找到 curses.h:

{
    "configurations": [
        {
            "name": "MSYS2",
            "includePath": [
                "C:/msys64/mingw64/include/ncurses/"
            ],
            "defines": [
                "_DEBUG",
                "UNICODE"
            ],
            "compilerPath": "C:/msys64/mingw64/bin/gcc",
            "intelliSenseMode": "clang-x64",
            "browse": {
                "path": [
                    "C:/msys64/mingw64/include/ncurses/"
                ],
                "limitSymbolsToIncludedHeaders": true,
                "databaseFilename": ""
            }
        }
    ],
    "version": 4
}

我已经尝试在路径名中使用正斜杠和反斜杠。似乎没有任何效果。我应该提到我正在使用 MSYS2/MinGW-w64。

【问题讨论】:

    标签: visual-studio-code msys2


    【解决方案1】:

    我注意到在我自己的默认“c_cpp_properties.json”文件中,所有路径字符串都使用了双反斜杠

    "C:\\So\\Something\\Like\\This.exe"
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-07-19
      • 1970-01-01
      • 1970-01-01
      • 2018-12-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多