mpfrcpp-common
[Top][All Lists]
Advanced

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

[MPFRCPP] Re: small compile error in mpfrcpp


From: Alexey Beshenov
Subject: [MPFRCPP] Re: small compile error in mpfrcpp
Date: Tue, 8 Apr 2008 23:54:40 +0400
User-agent: KMail/1.9.5

Thank you!

Now I have no idea why it happens: everything works for me in g++ 4.1.
It seems that your error message is belongs to g++ 4.3, I haven't tested it.

Maybe, mp_exp_t is defined as a synonym for some peculiar type. What MPFR 
version you are using? What is mp_exp_t in your installation?

On Tuesday 08 April 2008 10:05, you wrote:
> hello,
>
> I am trying to install and use your *MPFRCPP 1.4.2* library.
> I downloaded it and sudo make
>
> I have the following error messages
>
> (quite the same for g++ 3.4, 4.1 4.2 and 4.3)
>
> In file included from initialization/../mpfrcpp_uninitialized.hpp:87,
>                  from initialization/../mpfrcpp.hpp:37,
>                  from initialization/initialization.cpp:26:
> initialization/../real/to_string.hpp: In function std::string
> mpfr::internal::toString(const mpfr::Real&, int, const mpfr::Base&,
> const mpfr::RoundMode&, bool, bool)â:
> initialization/../real/to_string.hpp:77: error: call of overloaded
> abs(mp_exp_t&)â is ambiguous
> /usr/local/lib/gcc/i686-pc-linux-gnu/4.3.0/../../../../include/c++/4.3.0/cm
>ath:99: note: candidates are: double std::abs(double)
> /usr/local/lib/gcc/i686-pc-linux-gnu/4.3.0/../../../../include/c++/4.3.0/cm
>ath:103: note:                 float std::abs(float)
> /usr/local/lib/gcc/i686-pc-linux-gnu/4.3.0/../../../../include/c++/4.3.0/cm
>ath:107: note:                 long double std::abs(long double)
> initialization/../real/to_string.hpp:79: error: call of overloaded
> abs(mp_exp_t&) is ambiguous
> /usr/local/lib/gcc/i686-pc-linux-gnu/4.3.0/../../../../include/c++/4.3.0/cm
>ath:99: note: candidates are: double std::abs(double)
> /usr/local/lib/gcc/i686-pc-linux-gnu/4.3.0/../../../../include/c++/4.3.0/cm
>ath:103: note:                 float std::abs(float)
> /usr/local/lib/gcc/i686-pc-linux-gnu/4.3.0/../../../../include/c++/4.3.0/cm
>ath:107: note:                 long double std::abs(long double)
> make[1]: *** [staticlib] Erreur 1
>
> this can be easily fixed with (in to_string.hpp)
>
> ...
> namespace mpfr {
>
>     namespace internal {
>
>       static inline mp_exp_t _abs(const mp_exp_t& exp){ return (exp >=
> 0) ? exp : -exp; }
>
>
> ....
>
> and replacing the two cals to std::abs by  calls to _abs
>
> tell me if I missed something.
>
>            sincerely
>
>                JT Lapresté

-- 
Alexey Beshenov <address@hidden>
http://beshenov.ru/

Attachment: pgpM0N_ZqXLw6.pgp
Description: PGP signature


reply via email to

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