On recent Big Sur 11.3, when compiling a simple source like this :
g++-10 -c -Wall -c -I/usr/local/include -I/usr/local/include/c++/10.2.0 main_gnu.cpp
I get the following error :
clang: error: invalid version number in '-mmacosx-version-min=11.0'
This looks like to the same issue than in '-mmacosx-version-min=11.2'
I removed CLT (CommandLineTools) and reinstall it, same error.
I don't want to install Xcode since up to now, I always worked only with CLT to compile.
I have also tried : export SYSTEM_VERSION_COMPAT=1
I have the following installation :
I have also tried to make the link : MacOSX.sdk -> MacOSX10.15.sdk, without success.
I don't understand why clang is called and where this flag comes from, I just compile with brew g++-10.
What might have happened here?