www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - D and GMP

reply wesken gmx.de writes:
Hello,
I would like to use D with GMP on Windows XP, but I don't know what exactly to
do:
- Where can I get a pre-build GMP library for Windows/D?
- How to install?
- How to link to D?

Thanks a lot,
Willi
Sep 18 2005
parent reply "Ben Hinkle" <ben.hinkle gmail.com> writes:
<wesken gmx.de> wrote in message news:dgjhto$29rc$1 digitaldaemon.com...
 Hello,
 I would like to use D with GMP on Windows XP, but I don't know what 
 exactly to
 do:
 - Where can I get a pre-build GMP library for Windows/D?

Google for gmp.dll or something like that. Last I checked there were build instructions for using gmp on win32 but I can't remember if anyone had prebuilt dlls.
 - How to install?

the executable trying to use it.
 - How to link to D?

you really mean "link to the object files generated by D"? For the "use from" answer see http://home.comcast.net/~benhinkle/gmp-d/. For the "link files" supply the library on the command-line to dmd and it will link it in.
Sep 18 2005
parent reply Willi [wesken gmx.de] writes:
Hi Ben,
thanks for the quick answer and sorry to bother you..
I had already downloaded a file "libgmp.dll" and put it in ..\bin\ directory. 
I tried to compile/link e.g. pidigits.d:
"dmd pidigits mpz.d libgmp.dll" and got "Error: unrecognized file extension
dll"...




In article <dgjm2u$2dul$1 digitaldaemon.com>, Ben Hinkle says...
<wesken gmx.de> wrote in message news:dgjhto$29rc$1 digitaldaemon.com...
 Hello,
 I would like to use D with GMP on Windows XP, but I don't know what 
 exactly to
 do:
 - Where can I get a pre-build GMP library for Windows/D?

Google for gmp.dll or something like that. Last I checked there were build instructions for using gmp on win32 but I can't remember if anyone had prebuilt dlls.
 - How to install?

the executable trying to use it.
 - How to link to D?

you really mean "link to the object files generated by D"? For the "use from" answer see http://home.comcast.net/~benhinkle/gmp-d/. For the "link files" supply the library on the command-line to dmd and it will link it in.

Sep 18 2005
parent "Ben Hinkle" <ben.hinkle gmail.com> writes:
<Willi [wesken gmx.de]> wrote in message 
news:dgkdoh$31fv$1 digitaldaemon.com...
 Hi Ben,
 thanks for the quick answer and sorry to bother you..
 I had already downloaded a file "libgmp.dll" and put it in ..\bin\ 
 directory.
 I tried to compile/link e.g. pidigits.d:
 "dmd pidigits mpz.d libgmp.dll" and got "Error: unrecognized file 
 extension
 dll"...

You need the .lib file as well as the .dll. Put the lib in the dmd command instead of the dll. The dll is only needed at run-time not at compile-time.
Sep 18 2005