MPFR basics

Sisyphus kalinabears at iinet.net.au
Wed Dec 17 17:34:23 CET 2003


Paul Zimmermann wrote:

> 
> Are you sure you gave the correct -L option? I did on a Linux box:
> 
> $ tar zxf gmp-4.1.2.tar.gz
> $ cd gmp-4.1.2
> $ ./configure --disable-static --enable-shared --enable-mpfr
> $ make
> $ gcc -Impfr -I. -Lmpfr -L.libs e.c -lmpfr -lgmp
>   # e.c is the above, with mpfr_set_str
> $ ./a.out
> Done
> 

Yes - works ok for me on Linux, too. It's just with Win2k that I'm
experiencing a problem.

Thanks to all who responded. I'm hampered by having to build on a PII
233MHz laptop (./configure usually crashes my 1GHz desktop) - so if I
want to try building with different configure options such as those
suggested by Jim and Patrick (as I have today) it takes a long time and
I find it rather tiring. (I've also tried a few configure options that
have led to './configure' not running successfully.) I haven't yet found
the appropriate options -
faik the problem might well lie with my MSYS/gcc configuration, though
that configuration has previously served me well wrt GMP. I'm using
gcc-2.95.2 and msys-1.0.

I was only really wanting the log() functions that mpfr offers - and
it's only a recreational activity - so I don't want anyone getting
stressed over it :-)

I'll keep trying things, as time and energy permit. I'm still not 
prepared to rule out the possibility that I'm doing something stupid, 
but I need to wait until I'm feeling "fresh" before I tackle it again.

Below is the entire output I get from compiling that script I posted
(with the mpfr_set_str call included).


Cheers,
Rob

---- quote -----
C:\gcc\bin\..\lib\gcc-lib\i386-mingw32msvc\2.95.2\..\..\..\libmpfr.a(round_prec.o): 



In function `mpfr_round_raw_generic':
c:/gmp/mpfr_enable/gmp-4.1.2/mpfr/round_prec.c:89: undefined reference
to `__gmpn_copyd'
c:/gmp/mpfr_enable/gmp-4.1.2/mpfr/round_prec.c:148: undefined reference
to `__gmpn_copyi'
C:\gcc\bin\..\lib\gcc-lib\i386-mingw32msvc\2.95.2\..\..\..\libmpfr.a(round_prec.o): 



In function `mpfr_round_prec':
c:/gmp/mpfr_enable/gmp-4.1.2/mpfr/round_prec.c:207: undefined reference
to `__gmpn_copyi'
C:\gcc\bin\..\lib\gcc-lib\i386-mingw32msvc\2.95.2\..\..\..\libmpfr.a(round_prec.o): 



In function `mpfr_can_round_raw':
c:/gmp/mpfr_enable/gmp-4.1.2/mpfr/round_prec.c:289: undefined reference
to `__gmpn_copyi'
C:\gcc\bin\..\lib\gcc-lib\i386-mingw32msvc\2.95.2\..\..\..\libmpfr.a(div.o): 



In function `mpfr_div':
c:/gmp/mpfr_enable/gmp-4.1.2/mpfr/div.c:149: undefined reference to
`__gmpn_copyi'
c:/gmp/mpfr_enable/gmp-4.1.2/mpfr/div.c:272: undefined reference to
`__gmpn_copyi'
C:\gcc\bin\..\lib\gcc-lib\i386-mingw32msvc\2.95.2\..\..\..\libmpfr.a(div.o):c:/gmp/mpfr_enable/gmp-4.1.2/mpfr/div.c:439: 



more undefined references to `__gmpn_copyi' follow

---- end quote ----


-- 
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.






More information about the gmp-discuss mailing list