GMP used to do large number operations or very convenient, did not install on the Mac before, the revision of the new version of “algorithm-oriented design of data structures (C++ language version)” to add some content, so installed a.

/usr/local/gmp-6.2.1.tar. xz = gmp-6.2.1.tar.

One way installation:

  • GMP - 6.2.1 / CDS
  • ./configure
  • make
  • make check
  • sudo make install

Include

can be used on the command line, but I tried XCode, too much bother, solution:

  • Search Paths > Header Search PathsTo add/usr/local/include.
  • Search Paths > Library Search PathsTo add/usr/local/lib.
  • Linking > Other Linker FlagsTo add-lgmp.

I thought it was ok, but I got an error:

  • ld: symbol(s) not found for architecture arm64.

> Build Active Artchitecture > Build Active Artchitecture > Build Active Artchitecture > Build Active Artchitecture > Build Active Artchitecture > Build Active Artchitecture < Build Active Artchitecture > Or “Excluded Artchitectures” with arm64 Excluded.

Ld: warning: ignoring file /usr/local/lib//libgmp.dylib, Building for MacOS-arm64 but Attempting to link with file built for MacOS-x86_64

There seems to be a discussion on Homebrew, when I have time:

Get GMP building on Apple Silicon #57315

Github.com/Homebrew/ho…

ghc: apply arm64 compatibility patch to static gmp #57892

Github.com/Homebrew/ho…