Home > Software engineering >  How to configure clang and VS Code on a mac
How to configure clang and VS Code on a mac

Time:11-11

I'm trying to develop C code in VS Code on a mac. I have no problems building and debugging. However, my editor is full of red ink. Is there a way to fix my editor so it is as smart as the compiler?

Here's a simple example: enter image description here enter image description here enter image description here Those are just a couple of samples. My editor is filled with red marks.

I'm using Microsoft's C extensions for VS Code. I'm guessing that one of these needs to be configured better. enter image description here

Any thoughts on how to get rid of all of these red marks? Maybe a sample of a working config file or a suggestion of what I'm doing wrong? Thanks.

CodePudding user response:

I eventually found a problem in my .vscode/c_cpp_properties.json file. I removed "/Library/Developer/CommandLineTools/usr/include/c /v1" from the "includePath". Then intellisense started working again.

I have no idea how that line got into that file. I certainly didn't type it.

The change in GitHub.

  • Related