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

Framework Search Paths in compile_commands.json is not used #2508

Closed
heshuimu opened this issue Sep 11, 2018 · 2 comments
Closed

Framework Search Paths in compile_commands.json is not used #2508

heshuimu opened this issue Sep 11, 2018 · 2 comments
Labels
bug fixed Check the Milestone for the release in which the fix is or will be available. Language Service
Milestone

Comments

@heshuimu
Copy link

Type: LanguageService

Describe the bug

  • OS and Version: macOS 10.13.6
  • VS Code Version: VSCode 1.27.1
  • C/C++ Extension Version: 0.18.1
  • Other extensions you installed (and if the issue persists after disabling them): CMake, CMake Tools
  • A clear and concise description of what the bug is:

When using compile_commands.json generated by CMake and a custom Mac framework is included, framework search path in the form of -F/path/to/framework/parent/directory will present in the build command. But C++ Plugin does not include this during IntelliSense which gives squiggles wherever the framework header is used.

To Reproduce

  1. Create a CMake project with a C++ source file and include a custom iOS framework with include_directories.
  2. In the source file, include the framework header with the ordinary syntax.
  3. In VSCode, use plugin "CMake Tools" to build the CMake project.
  4. Set c_cpp_properties.json for project to use compile_commands.json generated by CMake
  5. (Restart VSCode to refresh, ) Open the source file and look for squiggle that says "source file is not found"

Expected behavior

The framework header should be recognized and IntelliSense should work as expected.

Additional context

...
  include: /usr/include
  framework: /System/Library/Frameworks
  framework: /Library/Frameworks
<THERE SHOULD HAVE BEEN framework: /path/to/framework/parent/directory>
  define: __llvm__=1
...
@heshuimu
Copy link
Author

Workaround:

Add the framework to /Library/Frameworks by copying or symlinking.

@bobbrow bobbrow added this to the On Deck milestone Sep 11, 2018
@bobbrow bobbrow added the fixed Check the Milestone for the release in which the fix is or will be available. label Oct 24, 2018
@bobbrow bobbrow modified the milestones: On Deck, October 2018 Oct 24, 2018
@bobbrow
Copy link
Member

bobbrow commented Oct 24, 2018

I added support for -F and -framework. Will be available in 0.19.1 released later this week.

@github-actions github-actions bot locked and limited conversation to collaborators Oct 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug fixed Check the Milestone for the release in which the fix is or will be available. Language Service
Projects
None yet
Development

No branches or pull requests

3 participants