GHCI/FFI/GMP/Me madness

Alastair Reid alastair at
Tue Aug 10 09:08:13 EDT 2004

>   - Rename all the symbols in our GMP to be unique. (sounds hard)

Nah, easy.

First get a list of symbols: nm libgmp.a | grep gmp
  [Supply a few flags to nm to get a better list.]

Then turn it into a list of #defines:

  #define gmp_blah ghc_gmp_blah

#include your list of #defines into some header file that everyone eats.

make clean; make

You can generate the list by hand or have it rebuilt by make every time.

Alastair Reid

More information about the Glasgow-haskell-users mailing list