gmpxx

Marc Glisse marc.glisse at inria.fr
Thu Dec 17 14:36:33 UTC 2015


On Thu, 17 Dec 2015, Andreas Fabri wrote:

> For the Visual C++ users of the C++ class library CGAL,
> we distribute the precompiled version of GMP, compiled
> with mingw gcc.  This is possible as it is just C, and
> it works like a charm.
>
> I am wondering if it is straightforward to compile
> just the C++ wrapper classes and link it with the
> precompiled library, or if the wrapper lib also
> needs proper configuration before compiling it.

Clearly, this isn't supported. Note that currently, libgmpxx.* is only 
needed for I/O (and some rare cases of numeric_limits), so you may be able 
to use the C++ wrapper with just the header gmpxx.h and no linking.

IF I remember correctly, compiling all the files in the cxx/ subdirectory 
into a library using an existing gmp.h, the file gmp-impl.h, and empty 
files for whatever is missing (config.h, gmp-mparam.h, etc) works. One may 
improve things with some of -DHAVE_STD__LOCALE, -DHAVE_NL_LANGINFO, 
-DHAVE_LOCALECONV (only if they are actually available). But that doesn't 
seem like a very reliable way to do it...

-- 
Marc Glisse


More information about the gmp-discuss mailing list