Using libgmp-3.dll with Borland C++ Builder
Sisyphus
sisyphus1 at optusnet.com.au
Mon Oct 17 07:36:49 CEST 2005
----- Original Message -----
From: "Daniel Bernardo" <info at bersoft.com>
To: <gmp-discuss at swox.com>
Sent: Monday, October 17, 2005 7:41 AM
Subject: Using libgmp-3.dll with Borland C++ Builder
> I have never linked a Borland C++ Builder project to a DLL, and now I'm
having trouble when I tried to use Delta Trinity port for Win32.
>
> I would appreciate if somebody has some C++ Builder code (I'm using the
version6) that shows how to work with the GMP dll.
>
Dunno much about Borland. With gcc you can link directly to the dll:
gcc -o my_app.exe my_app.c -LC:\location_of_libgmp-3_dll -lgmp-3
Will that work with Borland compilers ?
If it doesn't, then you'll have to build an import lib and link to that. If
you don't know how to create an import lib from the dll using Borland then
maybe ask about that on an appropriate forum.
Or try Google. Googling for 'Borland import library' turned up
http://www.nag.co.uk/numeric/BorlandC++.asp which suggested that you can
build an import library from the dll by running:
impdef libgmp.def libgmp-3.dll
implib libgmp.lib libgmp.def
I'm not sure if 'impdef' and 'implib' are Borland tools - you might have to
Google for them, too. In any case, that was the first (and only) link I
visited - you might find other solutions if you spend some time searching.
Once you have built the import lib (libgmp.lib) you should be able to build
your GMP app by linking to that import lib.
Cheers,
Rob
More information about the gmp-discuss
mailing list