Reputation: 43
I updated to macOS monterey yesterday and my vs code is not compiling any code since then. It is throwing these errors :
#include errors detected. Please update your includePath. Squiggles are
disabled for this translation unit (/Users/ishudhariwal/contest.cpp).
cannot open source file "endian.h" (dependency of "iostream")
It was working perfectly fine on BigSur. I am a beginner at programming. I can't figure out what's going wrong and how to fix it.
Upvotes: 3
Views: 7855
Reputation: 21
Before installing any command line tools just take a look at your Xcode, it might not be installed. First install it, after that you can try running this command
xcode-select --install
This worked for me. Hope it helps:)
Upvotes: 0
Reputation: 41
I have faced exactly the same problem as you a few days ago after updating my MacBook M1 on the Monterey. Frankly, I didn't go into too much detail about the situation, but after finding out the reason for this behaviour it became clear, that include files like stdio.h
and other disappeared miraculously. So in the end, a single command in the terminal helped -
xcode-select --install
I hope that it will help you to solve the problem.
Upvotes: 4
Reputation: 54
Try installing Xcode Command-line Tools. Most probably this will solve the issue.
Try the following.
Upvotes: -1
Reputation: 137
If you are using the C/C++ Package by Microsoft you need to update your c_cpp_properties.json file located in the generated .vscode folder. Add this to your MacFrameworkPath:
"macFrameworkPath": [
"/Library/Developer/**"
],
``` This will include all the files you need from /Library/Developer. The ** looks through every folder inside that and on.
Upvotes: 1