GMP-4.1.3 Built as Win 32 DLL with MPFR-2.0.3 and Tests

Mike Loehr michael635 at adelphia.net
Thu Aug 26 01:31:33 CEST 2004


Greetings;

I've been following the posts concerning GMP in a Win32 DLL.

Using the excellent info from Brian Gladman, Sysiphus, and the Core project
sites, I was able to create a VC-6 project and work space that compiles
GMP-4.1.3 with the newest MPFR-2.0.3 (several edits in mpfr.h).  The biggest
problem seems to be that the functions in mpfr.h and mpfr-impl.h aren't
setup to be exported into a DLL.  I've added an mpfr_declspec and
mpfrt_declspec macro (based on the gmp macro) in front of the mpfr functions
and the impl functions that are required to be exported to build the test
programs.  I've edited mpfr.h, and mpfr-impl.h to get this set up so that
the test functions may or may not be included in the DLL.  I've also added
some logic that should (that means it is untested) allow the Linux/gcc users
to compile as they currently are by defining two new macros that set the
declspec to blank.

I've been able to build the MPFR Test programs on the command line using a
makefile and the GMP DLL (I chose to call it gmp-4.1.dll in the VC project
based on the glib naming convention) produced by the VC project.  The tests
are run from a .bat file and they all (except for the str_out which crashes
after the first output) seem to run, however there are many that only fail
on the memory test at program exit, not on the internal mpfr functions.

If there is general interest, where should I post the files?  Are diffs
better?  Anyone interest in testing my creations? Pardon any dummy
questions, I'm new to working on these projects.

Mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 2312 bytes
Desc: not available
Url : /list-archives/gmp-discuss/attachments/20040825/1fa92bc4/winmail.bin


More information about the gmp-discuss mailing list