0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

VSCode ヘッダーファイル名でincludeしたときのエラーを消す方法

Last updated at Posted at 2021-08-11

結論

VSCode ヘッダーファイル名でインクルードしようとしてエラーが出たときはワークスペースの.vscode内にc_cpp_properties.jsonを設定するとエラーが消えます。

globalで設定する方法が無いようなので、すべてのワークスペースに置く必要があるようです。

c_cpp_properties.json
{
    "configurations": [
        {
            "name": "Mac",
            "includePath": [
                "${default}",
                "${workspaceFolder}/**"
            ],
            "defines": [],
            "macFrameworkPath": [
                "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks"
            ],
            "compilerPath": "/usr/bin/clang",
            "cppStandard": "c++11",
            "intelliSenseMode": "macos-clang-x64",
            "browse": {
                "limitSymbolsToIncludedHeaders": false
            }
        }
    ],
    "version": 4
}

参考

Customize default settings in Visual Studio Code C++ projects

【翻訳】Visual Studio Code C/C++ Extension の設定ファイル c_cpp_properties.json のリファレンスガイド - Qiita

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?