8

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?

4
  • Any updates or solution?
    – Laura
    Commented Nov 4, 2019 at 21:31
  • Might be related to stackoverflow.com/questions/58278260/…
    – Laura
    Commented Nov 5, 2019 at 18:18
  • I ran : xcode-select --install. That seemed to have fixed the problem for me. .
    – sikario
    Commented Nov 8, 2019 at 10:16
  • @SanjayNath please add that comment as an Answer.
    – pkamb
    Commented Nov 18, 2019 at 8:44

1 Answer 1

6

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.

  1. Always try

    xcode-select --install
    
  2. 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.

  3. 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.

2
  • 2
    How 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
  • 1
    I'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.
    – jimtut
    Commented Dec 4, 2020 at 5:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .