Compiling MPFR with VC6

Sisyphus sisyphus1 at optusnet.com.au
Fri Apr 7 04:55:28 CEST 2006


----- Original Message ----- 
From: "Ben Aguayo" <info at change7.com>
To: <gmp-discuss at swox.com>
Sent: Friday, April 07, 2006 10:07 AM
Subject: Compiling MPFR with VC6


> Problem compiling MPFR DLL
> I have compiled successfully the GMP dll using the VC6 Project from Brian
Gladman
> (http://fp.gladman.plus.com/computing/gmp4win.htm).
>
> My problem is that when compiling the MPFR dll, the export .lib file is
not created.

There's an MPFR-specific mailing list - which is probably more appropriate
for MPFR questions - especially now that MPFR no longer ships with GMP. For
details see http://sympa.loria.fr/wwsympa . (However, many of the people
subscribed to that list are also subscribed to this one.)

Which import lib is missing - the gmp lib or the mpfr lib ?
Are you sure the mpfr dll built ok ? Maybe a file called mpfr.dll got
created - but maybe it's also full of crud .... or perhaps even empty.

>
> If I try to create it by running implib I receive this error message:
>  Warning mpfr.dll: no exports
>

Dunno - assuming the mpfr dll is ok, maybe try:
impdef MPFR.def MPFR.dll

And then use the def file with the 'lib' command to create the import lib.

Alternatively you can get a list of the exports by running:
dumpbin /EXPORTS MPFR.dll

and then use that list to write your own def file for lib.exe to use (thus
using MSVC++ tools only).

But if the mpfr dll really does export nothing, then you should consider the
possibility that it didn't build correctly.

> I look forward to upgrade to Visual C++ 8 as soon as I can,

Afaik you can download a free version of VC++8 from the MS website. But it's
only a command line version - so if you need to use it in a gui kind of way,
it may be of no use. It's also not a single download - you need to download
the SDK (also free) separately, and maybe some other stuff (also free) as
well.

> and so test the newer Gladman projects, but for now I'm stuck in VC6 and I
would really appreciate if anyboady can give
> me a tip for compiling successfully mpfr 2.0.3 with VC6 on Windows XP.
>

The current release of mpfr is 2.2.0, btw.

You'll find that building both GMP and MPFR in the (freely available) MSYS
shell using the (freely available) MinGW compiler is braindeadedly trivial.
You can even use the dll created that way with MSVC++6 if you so desire - by
using the methods outlined above to first create an import lib from the dll
and def file.

Cheers,
Rob



More information about the gmp-discuss mailing list