how to link precompiled gmp provided by deltatrinity

Andreas Fabri Andreas.Fabri at sophia.inria.fr
Sun Apr 23 15:39:01 CEST 2006


Sisyphus wrote:
> ----- 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
> 

Thanks a lot.
It almost works. When running a program that uses the lib,
I get the error message at runtine that libgmp-3.dll.dll
cannot be found.

If I rename libgmp-3.dll to libgmp-3.dll.dll it works,
but I guess I have to read how to teach the lib tool not
to double the postfix ".dll" coded in libgmp-3.lib

best regards,

andreas

> Cheers,
> Rob
> 
> 



More information about the gmp-discuss mailing list