GMP Development Tidbits

Torbjorn Granlund tege at swox.com
Fri Nov 4 12:24:56 CET 2005


Joppe Bos <jwbos at science.uva.nl> writes:

  Hi all,
  
  Recently I saw the GMP Development Tidbits page
  (http://www.swox.com/gmp/development.html) and since I really would
  like to try the new gcd code I tried to re-compile GMP.
  I changed my gmp-impl.h file and run the sed command on all the source and
  header files. Compiling with the new gcd files went ok without any errors,
  but when I link my program to GMP I get the following message:
  
  /usr/local/lib/libgmp.so: undefined reference to `UNLIKELY'
  /usr/local/lib/libgmp.so: undefined reference to
  `__gmp_tmp_reentrant_free'
  /usr/local/lib/libgmp.so: undefined reference to `LIKELY'
  /usr/local/lib/libgmp.so: undefined reference to
  `__gmp_tmp_reentrant_alloc'
  collect2: ld returned 1 exit status
  
  This are macros I had to put into gmp-impl.h file. Did I do something
  wrong? Has anybody else tried to compile GMP with the tidbits?
  
Sorry, I missed that.  To define these properly is non-trivial
and would require bits from several files.  Instead, please put
these definitions in gmp-impl.h:

#define LIKELY(cond)    (cond)
#define UNLIKELY(cond)  (cond)

-- 
Torbjörn


More information about the gmp-discuss mailing list