On 20/09/2017 11:30, Francis Andre wrote:
> Hello
> 
> I am porting on Windows a Linux application that is a consuler of the GNU gmp 
> library. Googling for GMP on Windows, I did not find any realistic GMP 
> packaging on Windows except the mpir library, which in my understandin is a 
> fork fo the GNU gmp library. So I choose to use the mpir librairy to replace 
> the GNU gmp one. But the include interface is different. The ported 
> application is referring the include gmpxx.h which is in fact the mpir.h.
The main include files in GMP are <gmp.h> for use in code written in C
and <gmpxx.h> for use in code written in C++.

The equivalent files in MPIR are <mpir.h> and <mpirxx.h> respectively.

> Thus can this 'mpir.h' include be renamed 'gmpxx.h' or copied to 'gmpxx.h' so 
> that a full compatibility be insured. By the way, the head of mpir.h is as 
> below
> 
> /* gmpxx.h -- C++ class wrapper for GMP types.  -*- C++ -*-
> 
> Copyright 2001, 2002, 2003, 2006, 2008, 2011, 2012 Free Software Foundation

This file appears to be the C++ interface to GMP, not a renamed <mpir.h>

Renaming <mpir.h> as <gmpxx.h> won't work as this will only provide the
C interface to MPIR whereas any code that uses <gmpxx.h> is presumably
expecting to use the C++ interface in <mpirxx.h>.

To use MPIR as a replacement for GMP in C and C++ code you need to
include <mpir.h> instead of <gmp.h> and <mpirxx.h> instead of <gmpxx.h>.

If you wish to do this by renaming files instead of changing the include
file names, you will need to rename <mpirxx.h> to <gmpxx.h>.

But <mpir.h> does not need to be renamed (and should not be) because
MPIR already provides a copy of <mpir.h> renamed as <gmp.h>.

-- 
You received this message because you are subscribed to the Google Groups 
"mpir-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mpir-devel+unsubscr...@googlegroups.com.
To post to this group, send email to mpir-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/mpir-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to