[Top][All Lists]

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

[Bug-gmp] a bug.... or not a bug...??

From: Wladimir Pekar
Subject: [Bug-gmp] a bug.... or not a bug...??
Date: Mon, 21 Aug 2000 11:30:33 +0200

Hello guys,

      first of all I want to express my admiration to everybody of you whose ent
husiasm and devoted work made it possible for people to have such qualitative so
ftware - Thank you. But now to the business...
      I have problems with compiling programs including gmp-functions. I don't r
eally believe that it is a bug (maybe it's my fault) but I've actually tried eve
rything I could. For example one of your demos - isprime.c also refuses to be co
mpiled. Heir is its source:
#include <stdio.h>
#include "gmp.h"

main (argc, argv)
     int argc;
     char **argv;
  mpz_t n;

  mpz_init (n);
  mpz_set_str (n, argv[1], 0);
  return ! mpz_probab_prime_p (n, 10);

And heir what I get when I try to compile it with gcc isprime.c (gcc version egc
s-2.91.66 19990314/Linux (egcs-1.1.2 release)):
/tmp/cclhutcw.o: In function `main':
/tmp/cclhutcw.o(.text+0xb): undefined reference to `__gmpz_init'
/tmp/cclhutcw.o(.text+0x22): undefined reference to `__gmpz_set_str'
/tmp/cclhutcw.o(.text+0x30): undefined reference to `__gmpz_probab_prime_p'
collect2: ld returned 1 exit status

Compilation exited abnormally with code 1 at Sun Aug 20 17:46:09

What I find strange is that mpz_t n; is accepted but the rest not(it can be veri
fied by setting remarks after this line).

uname -a:
Linux localhost.localdomain 2.2.5-15 #1 Mon Apr 19 23:00:46 EDT 1999 i686 unknow


Thank You.

reply via email to

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