gmp, mpfr, Windows port

Andreas Fabri Andreas.Fabri at sophia.inria.fr
Mon Nov 1 15:44:01 CET 2004


Hello,

I work in the CGAL project, which makes an open source
library where the user can choose the type of arithmetic
for coordinates of geometric objects. One option is
the rational number type of GMP and we then use mpfr
to compute enclosing double intervals for rational numbers,
in order to do interval arithmetic.

CGAL is across platform library, which particularly means
also supporting Windows compilers.  The proposed solution
in this forum is to use mingw and g++ in order to
create the dll, and to use the Microsoft lib tool
to create the lib.  For mpfr we got the recipe to
create the .a and to rename it to .lib
Doing this  we encountered problems with missing
memory allocation functions, and there  a suggestion
on this mailing list is to also link libgcc.a from
mingw, even if one uses Visual C++.   This compiles
and links, but the executables using it often crash
as soon as we use mpfr.

The first time that our testsuite worked without
crashing, was with Brian Gladman's approach.


Do you see a way to better integrate your work,
because as it is now is really hard for your users.
* mpfr is not up to date in the gmp distribution.
* mpfr does not generate a dll (Brian has patches
   for this).
* I recently got a mail announcing a
   release candidate for mpfr. Now I have to do
   wait for Brian to redo his changes, unless the
   mpfr folks incorporate his patchs in their code.

Yes this is work, but taking into account that
Windows is a major platform  (if we like it or
not), it seems worth the effort for the success
of "arithmetic without limitations".

Best regards,

Andreas




More information about the gmp-discuss mailing list