how to link precompiled gmp provided by deltatrinity

Sisyphus sisyphus1 at optusnet.com.au
Sat Apr 22 01:04:38 CEST 2006


----- Original Message ----- 
From: "Andreas Fabri" <Andreas.Fabri at sophia.inria.fr>
To: <gmp-discuss at swox.com>
Sent: Saturday, April 22, 2006 4:52 AM
Subject: how to link precompiled gmp provided by deltatrinity


>
>
> Hello,
>
> deltatrinity provides precompiled shared libraries for
> GMP-4.2 for Windows:
>
> ftp://deltatrinity.dyndns.org/gmp-4.2_DLL_SharedLibs/pentium4
>
> Files:
> libgmp-3.dll
> libgmp-3.dll.def
>
>
> Can anybody explain me how to link this in an application.
> Do I first have to generate a lib file that I then can link?
>

If you're using gcc you can simply link directly to the dll. I think
'-L/path/to_dll -lgmp-3' should do the trick.
If you're using a Microsoft compiler then, yes, you need to first build an
import lib, and then link to it. You can build that import lib (using Visual
Studio's 'lib' tool) with:

lib /def:libgmp-3.dll.def /out:libgmp-3.lib

Cheers,
Rob



More information about the gmp-discuss mailing list