MPFR basics

Patrick Pelissier Patrick.Pelissier at loria.fr
Mon Dec 15 11:54:31 CET 2003


It is the typical error when you build Mpfr and Gmp with different options. 
I don't know more. Tries with enable-static, maybe?

Sincerely, 
 Patrick Pelissier

On Mon, Dec 15, 2003 at 05:05:25 +1100, Sisyphus wrote:
> Hi,
> The following builds and runs fine so long as I link to both -lmpfr and 
> -lgmp (in that order):
> 
> -----------------------
> #include <stdio.h>
> #include <gmp.h>
> #include <mpfr.h>
> 
> int main() {
>      mpfr_t x;
>      mpfr_init (x);
> /*   mpfr_set_str(x, "123456.2", 10, GMP_RNDN); */
>      mpfr_clear(x);
>      printf("Done\n");
>      return 0;
> }
> -----------------------
> 
> But as soon as I include the mpfr_set_str() call I get (multiple) 
> undefined references to __gmpn_copyd and __gmpn_copyi.
> What have I done wrong ? I built gmp-4.1.2 and mpfr (in an MSYS shell on 
> Windows2000 using gcc) with:
> ./configure --disable-static --enable-shared --enable-mpfr
> 
> Cheers,
> Rob
> 
> -- 
> Any emails containing attachments will be deleted from my ISP's mail 
> server before I even get to see them. If you wish to email me an 
> attachment, please provide advance warning so that I can make the 
> necessary arrangements.
> 
> _______________________________________________
> gmp-discuss mailing list
> gmp-discuss at swox.com
> https://gmplib.org/mailman/listinfo/gmp-discuss


More information about the gmp-discuss mailing list