how to link precompiled gmp provided by deltatrinity
Andreas.Fabri at sophia.inria.fr
Sun Apr 23 15:56:47 CEST 2006
Andreas Fabri wrote:
> 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
>>> deltatrinity provides precompiled shared libraries for
>>> GMP-4.2 for Windows:
>>> 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
The problem is that there are two "." in libgmp-3.dll.def
Renaming it to libgmp-3.def solves the problem.
> best regards,
> gmp-discuss mailing list
> gmp-discuss at swox.com
More information about the gmp-discuss