You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey! I just upgraded to macOS 11 and it seems like it can't find the cmath header anymore.
> make
CXX src/arr.cpp build/obj/arr.o
clang: warning: include path for libstdc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
src/arr.cpp:4:10: fatal error: 'cmath' file not found
#include <cmath>
^~~~~~~
1 error generated.
make: *** [build/obj/arr.o] Error 1
I did a bit of digging around, and it seems like the problem lies in Makefile.common:233.
My hunch is that target SDK version and the -mmacosx-version-min have to have the same major version number. If I change the above line to the following, it seems to work.
Hey! I just upgraded to macOS 11 and it seems like it can't find the
cmath
header anymore.I did a bit of digging around, and it seems like the problem lies in
Makefile.common:233
.My hunch is that target SDK version and the -mmacosx-version-min have to have the same major version number. If I change the above line to the following, it seems to work.
Alternatively, if I simply remove the minimum version flag, it build successfully. See below:
Taking a closer look at my SDKs directory, I see the following, which would partially explains my hunch.
I'm not intimately familiar with how macOS SDK targeting works, but I thought I'd share my initial investigation. Thanks!
The text was updated successfully, but these errors were encountered: