Sample Header Ad - 728x90

assert.h not found when including bits/stdc++.h

5 votes
1 answer
3031 views
Yesterday I upgraded my Command Line Tools to version 14.2, and my macOS version to Ventura 13.1. When I tried to include bits/stdc++.h inside a C++ file and compile it, it gave me this error:
fatal error: assert.h: No such file or directory
   44 | #include 
      |          ^~~~~~~~~~
The error clearly seems to originate from the missing assert.h file (along with some others, such as ctype.h). I checked my /usr/include directory, and it does appear that the assert.h file does not exist. I am using g++12 which I installed from homebrew. I tried reinstalling g++ and command line tools, but that did not help. Also, before upgrading my command line tools, everything worked fine. What can I do to fix this?
Asked by J Muzhen (191 rep)
Dec 24, 2022, 02:00 AM
Last activity: Dec 24, 2022, 03:44 AM