Win32 GMP 4.1.2 without cygwin

Sisyphus kalinabears@hdc.com.au
Wed, 15 Jan 2003 18:36:09 +1100


----- Original Message -----
From: "Kevin Ryde" <user42@zip.com.au>
To: "Sisyphus" <kalinabears@hdc.com.au>
Cc: <manolo@el-mundo.net>; "GMP" <gmp-discuss@swox.com>
Sent: Wednesday, January 15, 2003 12:11 PM
Subject: Re: Win32 GMP 4.1.2 without cygwin


> "Sisyphus" <kalinabears@hdc.com.au> writes:
> >
> > I've built it (with mingw) on my PII, and am running that build on my
PIII.
> > I'd be
> > interested to see the difference produced by running a PIII build
>
> There's very few differences with p-3 over p-2 currently, just a
> slightly faster popcount and hamdist if I remember rightly.
>

Ok, I won't get too worried about it. Just took a look at delta trinity's
PIII version. The PIII dll is a bit smaller than mine. 'gmp.h' is identical.
I might run some benchmark comparisons if I get sufficiently energetic :-)

> > But the building of any of my apps depends upon libgmp.a. If I try to
build
> > without it, I get unresolved references. Am I missing something ? Is
there a
> > way to build apps using only gmp.h and libgmp-3.dll ?
>
> I think that's supposed to work, make a bug report with full
> information if it doesn't.  You might need to ensure you've got the
> gmp.h from the DLL build, not from the static build, since they differ
> subtly.
>

I've no problem with having to link to 'libgmp.a'. (It's the file
'libgmp.dll.a' which I simply renamed so that I could link to it with
'-llibgmp', btw.)

But it was puzzling me as to how I was going to use my mingw-built files
with msvc, given that I had no 'libgmp.lib' to link to.

I've since learned that I can take the mingw-built 'libgmp-3.dll-def' and
run it through the msvc 'lib' tool (lib /def:libgmp-3.dll-def) to get the
'.lib' file I was wanting for msvc. Thanks for the info, Manolo.

So long as I link to that '.lib' file I can build apps with msvc using the
mingw-built 'libgmp-3.dll' and 'gmp.h'.

I'm happy with that.

Thanks, guys.

Cheers,
Rob