bug-gmp
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gmp: compilation problem


From: Francois Thomasset
Subject: gmp: compilation problem
Date: Wed, 12 Mar 2003 15:42:16 +0100

Hi,
We use gmp-4.1.2.
I am working on an interface between MuPAD (www.mupad.de) and a solver of
systems of linear inequations, written in C and calling the gmp library.
I was happily developping and testing on my linux workstation, and then
decided to port it to my laptop (compaq dell under redhat). And the compilation
crashed, trace is below.
Sorry for the messages in french; I guess that "patron avec liaison C" can
be translated as "template with C binding" and "a partie de" as "from".

-------------------------------------------------------------------------------

Dans le fichier inclus a partir de /usr/include/c++/3.2/iosfwd:45,
a partir de /home/thomasse/Gmp/gmp.h:26,
a partir de [...]
/usr/include/c++/3.2/bits/stringfwd.h:49: patron avec liaison C
[...]
Dans le fichier inclus a partir de /usr/include/c++/3.2/iosfwd:46,
a partir de /home/thomasse/Gmp/gmp.h:26,
a partir de [...]
/usr/include/c++/3.2/bits/fpos.h:54: patron avec liaison C
Dans le fichier inclus a partir de /home/thomasse/Gmp/gmp.h:26,
a partir de [...]
/usr/include/c++/3.2/iosfwd:52: patron avec liaison C
/usr/include/c++/3.2/iosfwd:55: patron avec liaison C
[...]
Dans le fichier inclus a partir de /home/thomasse/piplib/include/piplib/piplib.h
:54,
a partir de [...]
/home/thomasse/Gmp/gmp.h:2073: declaration de la fonction C <<std::ostream&
operator<<(std::ostream&, const __mpq_struct*)>> en conflit avec
/home/thomasse/Gmp/gmp.h:2072: declaration precedente de <<std::ostream&
operator<<(std::ostream&, const __mpz_struct*)>> ici
/home/thomasse/Gmp/gmp.h:2074: declaration de la fonction C <<std::ostream&
[...]

-------------------------------------------------------------------------

Here below the lines 2072 and following in my gmp.h :
(I guess you have it, but I include it to avoid misunderstandings)
__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpz_srcptr);
__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpq_srcptr);
__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpf_srcptr);
__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpz_ptr);
__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpq_ptr);
__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpf_ptr);

Line 48-49 of my stringfwd.h :
  template<class _CharT>
    struct char_traits;

---------------------------------------------------------------------------

Note that because of MuPAD I must use a C++ compiler. The one I use on
my laptop is g++:
version gcc 3.2 20020903 (Red Hat Linux 8.0 3.2-7)
On my workstation it was:
gcc version 2.95.2 19991024
Maybe I must revert to 2.95.2...

I noticed in the info files that we must tell to gmp that it will be called
from C++. So I re-configured with the options which I belived were correct:
./configure --enable-cxx CPPFLAGS=-D__USE_STD_IOSTREAM
Then I remade and reinstalled my libraries, without more success...

What can be wrong?
Do you have a clue?
I know, it might be a c++ problem rather than a gmp bug, however I am fishing 
for any information that might lead me to the solution.

Best Regards,


                                        François Thomasset.
                                        INRIA (A3)

address@hidden          Tel: +33 (1) 39-63-54-75
                                        Fax: +33 (1) 39-63-59-95
INRIA, Rocquencourt, BP 105, 78153 Le Chesnay Cedex, France






reply via email to

[Prev in Thread] Current Thread [Next in Thread]