I used brew install gcc, and brew install gmp. However clang could compiler with option "-lgmpxx" and succeed while g++ failed I used this command:
g++ bn_p.cpp -o bn_p.out -lgmpxx -lgmp -Xpreprocessor -fopenmp
And it said:
fatal error: gmpxx.h: No such file or directory
4 | #include <gmpxx.h>