What happened to header files after Catalina update? I am getting the error "assert.h:No such file or directory". In Mojave this issue was solved by using macOS_SDK_headers_for_macOS_10.14.pkg package. Is there any such package for 10.15 or any other solution? Is anyone else facing this issue?
-
Any updates or solution?– LauraCommented Nov 4, 2019 at 21:31
-
Might be related to stackoverflow.com/questions/58278260/…– LauraCommented Nov 5, 2019 at 18:18
-
I ran : xcode-select --install. That seemed to have fixed the problem for me. .– sikarioCommented Nov 8, 2019 at 10:16
-
@SanjayNath please add that comment as an Answer.– pkambCommented Nov 18, 2019 at 8:44
1 Answer
Recently I also updated to Catalina and got the same problem. As it was mentioned there is no equivalent package macOS_SDK_headers_for_macOS_10.14.pkg for Mac OS 10.15 which solves the problem for Mojave.
There are several things you can do which worked for me.
Always try
xcode-select --install
Some answers recommend to agree with the license. I'm not sure if it's helpful but I did it anyway
sudo xcodebuild -license
and type agree.
Apparently you can find these headers in a /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include directory. So you can add it to some environment/build system variable.
-
2How can we tell the OSX to look for the common headers in this new directory? Normally you do not need to specify where the headers are. I use CLion and never had to do it Commented Mar 23, 2020 at 16:48
-
1I'm struggling with this on Big Sur on an M1 Mac mini, so my problem is a little different, but I'm missing EXTERN.h and ended up here. To answer @HectorEsteban, you would normally set the CPPFLAGS env var to a value like "-I//Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include" (without the quotes, and note the dash-capital-i at the beginning of that value". WFM when compiling other UNIX-y code and I need to include headers in non-standard locations.– jimtutCommented Dec 4, 2020 at 5:16