stdlib.h compilation error for macports gcc9.
oraclmaster at gmail.com
Sun Feb 7 21:24:55 UTC 2021
I don’t know if this is a result of updating to the latest macports gcc9, or the update of XCode, but
all of a sudden when I try to build my C++ program which includes <cstdio> I get this strange
chain reaction of errors.
In file included from /opt/local/include/gcc9/c++/ext/string_conversions.h:41,
/opt/local/include/gcc9/c++/cstdlib:75:15: fatal error: stdlib.h: No such file or directory
75 | #include_next <stdlib.h>
From my makefile this seems to be the offending includes statement:
I’ve googled and it seems that it can’t find stdlib.h, even though it is on my CPATH environment variable:
More information about the macports-users