ncw / gmp

Go language interface to GMP - GNU Multiprecision Library (golang)
BSD 3-Clause "New" or "Revised" License
115 stars 26 forks source link

gmp.h missing #6

Open townhill opened 7 years ago

townhill commented 7 years ago

Hi

Can you include the gmp.h file? I'm getting the following error.

gmp
ncw commented 7 years ago

You need to make sure you have libgmp-devinstalled and it should provide the gmp.h file.

Amazingly I seem to have missed that from the docs!

townhill commented 7 years ago

Thanks! Sorted now :)

msh2050 commented 2 years ago

how to do that in windows?

preraku commented 11 months ago

If anyone needs more help, I did the following on MacOS before successfully running go build:

  1. brew install gmp
  2. go get github.com/ncw/gmp
  3. CGO_CPPFLAGS="-I/opt/homebrew/include"
    • I got this path from find /usr /opt -name "gmp.h", but it's wherever gmp.h can be found or was installed.
  4. CGO_LDFLAGS="-L/opt/homebrew/lib"