Using GMP 4.2.1 on Visual C++, Windows XP
Chris Saunders
evas at mountaincable.net
Tue Dec 5 08:02:36 CET 2006
I use static libs of GMP 4.2.1 and MPFR 2.2.1 built with MinGW and MSYS with
Visual Studio 2005 frequently and have experienced no problems.
Regards,
Chris Saunders
-----Original Message-----
From: gmp-discuss-bounces at swox.com [mailto:gmp-discuss-bounces at swox.com] On
Behalf Of Sisyphus
Sent: Monday, December 04, 2006 6:53 PM
To: Ismet Togay; gmp
Subject: Re: Using GMP 4.2.1 on Visual C++, Windows XP
----- Original Message -----
From: "Ismet Togay" <ismet at su.sabanciuniv.edu>
.
.
>
> I have found the following web page which shows the integration of GMP and
> Visual C++: http://cs.nyu.edu/exact/core/gmp/
I suspect that page applies only to the building 4.1. Perhaps the author of
that page has updates for 4.2.1.
If you're dreating a dynamic (dll) build, you could always build GMP-4.2.1
in the MSYS shell with the MinGW compiler, and use that dll with VC++. From
http://swox.com/gmp/manual/Notes-for-Particular-Systems.html#Notes-for-Parti
cular-Systems:
-- quote--
A MINGW DLL build of GMP can be used with Microsoft C. Libtool doesn't
install a .lib format import library, but it can be created with MS lib as
follows, and copied to the install directory. Similarly for libmp and
libgmpxx.
cd .libs
lib /def:libgmp-3.dll.def /out:libgmp-3.lib
MINGW uses the C runtime library `msvcrt.dll' for I/O, so applications
wanting to use the GMP I/O routines must be compiled with `cl /MD' to do the
same. If one of the other C runtime library choices provided by MS C is
desired then the suggestion is to use the GMP string functions and confine
I/O to the application.
--end quote--
If you want to build a static GMP library, I think that, too, will work with
VC++ if you also link to MinGW's libgcc.a. (Not sure about this .... it has
been a while since I tried....)
Other than that, there's http://fp.gladman.plus.com/computing/gmp4win.htm
_______________________________________________
gmp-discuss mailing list
gmp-discuss at swox.com
https://gmplib.org/mailman/listinfo/gmp-discuss
More information about the gmp-discuss
mailing list