microsoft / microsoft/vscode-cpptools

Including headers from a sub-framework

Open
#10,796 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug Feature: Configuration Language Service
Dominant language
TypeScript
Stars
6.2k
Forks
1.7k
Avg merge
14h 46m
Merged PRs (30d)
61

Description

My code just has #include <Accelerate/Accelerate.h>, to which Intellisense gives the error cannot open source file "cblas.h"
I have the macFrameworkPath set to the same as you posted above and that helps resolve all the frameworks I'm using in this project (CoreFoundation, CoreAudio, Accelerate).

I have also tried adding the sub-framework to macFrameworkPath like
"/Applications/Xcode.app/Contents/Developer//Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks"
hoping that would help but it didn't.

My entire c_cpp_properties is

{
    "configurations": [
        {
            "name": "Mac",
            "includePath": [
                "/Users/lucianthorr/dev/myproject/**",
                "/Applications/Xcode.app/Contents/Developer//Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Headers"
            ],
            "defines": [],
            "macFrameworkPath": [
                "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks"
            ],
            "cStandard": "c11",
            "cppStandard": "c++17",
            "intelliSenseMode": "macos-clang-arm64",
            "mergeConfigurations": false,
            "compilerPath": "/usr/bin/clang",
            "browse": {
                "limitSymbolsToIncludedHeaders": true,
                "path": [
                    "${workspaceFolder}/**"
                ]
            }
        }
    ],
    "version": 4
}

Originally posted by @lucianthorr in https://github.com/microsoft/vscode-cmake-tools/issues/3094#issuecomment-1502105234

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Accelerate/Accelerate.h include failure with the supplied c_cpp_properties configuration, then trace how macFrameworkPath resolves the nested vecLib.framework/Headers path. Done means IntelliSense resolves cblas.h without requiring an additional manual include path.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, cpp, macos
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.