bug-gmp
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

undefined reference __gmpz_init


From: DeLuca, Michael
Subject: undefined reference __gmpz_init
Date: Fri, 18 Jan 2002 08:19:03 -0500

Hello gmp gurus.
I have seen this problem addressed on this list before, but none of the
solutions provided worked for my environment, so here it is again:  I have
GMP 4.0, and am attempting to use it on a Windows NT 4.0 i686 pentium 2
using cygwin.  Using gcc version 2.95.3-5 (cygwin special), I find myself
unable to link any code that uses the gmp functions. 
My C code looks like this:
#include <stdio.h>
#include <gmp.h>
int main (void)
{
   mpz_t z;
   mpz_init (z);
}
My compile command looks like this: gcc -lgmp test.c
I get an error that looks like this:
/cygdrive/c/TEMP/ccVD46Qu.o(.text+0x90):test.c: undefined reference to
'__gmpz_init'.
And indeed, in gmp.h that identifier is referenced but not defined: (line
725) #define mpz_init __gmpz_init, and in gmp-4.0/mpz/init.c, mpz_init is
defined to something else!  Nowhere in any 
Please help me!
Thank you!
Michael DeLuca





reply via email to

[Prev in Thread] Current Thread [Next in Thread]