clang: error: invalid version number in '-mmacosx-version-min=11.2'

Viewed 5164

I am currently on Mac OSX Big Sur 11.2.3. Whenever I run the command:

g++-10 -o project0 project0.cpp -lm -fopenmp

I get the following error:

clang: error: invalid version number in '-mmacosx-version-min=11.2'

I realized that this may be due to the fact that I'm on Big Sur 11.2.3 but I was told that this should not be an issue. I've tried many things already such as reinstalling gcc doing brew install gcc and so forth to no avail. At this point, I'm very unsure on what to do. Any help would be very much appreciated!

1 Answers

I ran into the same problem while trying to install fiona. You are correct it is due to Big Sur, as you can see in this article

Follow it and it should sort out the issue. Note, I had to uninstall Command Line tools and re-install it as outlined in this answer.

Related