Problem with GMP 4.1.4 ... cant't link mpz_init2 and mpz_realloc2

Paulo Sousa pjsousa at di.fc.ul.pt
Fri Oct 14 17:13:02 CEST 2005


Hi all,

I installed GMP version 4.1.4 on a Red Hat Linux 7.1 machine with kernel 
2.4.18 and with gcc version 2.96.
Everything works fine with the exception that functions mpz_init2 and 
mpz_realloc2 seem to have some problem. For instance, when I try to use 
mpz_init2, the linker stops with the following error:

/tmp/cc3iyNzE.o: In function `main':
/tmp/cc3iyNzE.o(.text+0x13): undefined reference to `__gmpz_init2'
collect2: ld returned 1 exit status

I'm using the following command to compile/link:
gcc -o init2_problem init2_problem.c -Wall -lgmp

The test program goes in attachment. The same program works fine when 
using mpz_init.

Any suggestions?

Thanks in advance!

Cheers,
Paulo Sousa
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: init2_problem.c
Url: http://gmplib.org/list-archives/gmp-bugs/attachments/20051014/98b2f14d/init2_problem.c


More information about the gmp-bugs mailing list