Boost logo

Boost Users :

Subject: Re: [Boost-users] Linker error on windows
From: Lars Mogensen (larsvmogensen_at_[hidden])
Date: 2010-09-24 03:24:40


Does anyone know if this issue is being handled in future versions of BOOST?

The rounding functions of BOOST math are not compatible with the MS Visual
C++ development suite. They use the rint() call from the math library, which
is not supported.

Where should I post this to alert the developers?

/Lars

2010/9/17 Lars Mogensen <larsvmogensen_at_[hidden]>

> I can see that you have found out the same as I have. The rint() function
> is not supported by the MSVC standard math library.
>
> I have found several rint() implementations using google, but will it help
> to put this into the version that I am limited to (1.36)? I can see that
> rint() is also in the new 1.44 version "msvc_rounding_control.hpp". Is it
> something I am doing wrong?
>
> /Lars
>
> 2010/9/16 Paul A. Bristow <pbristow_at_[hidden]>
>
>
>>
>> > -----Original Message-----
>> > From: boost-users-bounces_at_[hidden] [mailto:boost-users-
>> > bounces_at_[hidden]] On Behalf Of John Maddock
>> > Sent: Thursday, September 16, 2010 5:05 PM
>> > To: boost-users_at_[hidden]
>> > Subject: Re: [Boost-users] Linker error on windows
>> >
>> > >> > I am using BOOST to do math and have not been able to get the
>> > >> > "findroot_demo.cpp" example of root finding to work. There seem to
>> > >> > be a reference to rint(), which is not implemented in the C++
>> > >> > library for windows. How can I solve this - my understanding of
>> > >> > BOOST is that it is cross-platform?
>> >
>> > Unfortunately this is either a Boost or an MSVC bug depending upon your
>> point
>> > of view :-(
>> >
>> > Boost.Interval depends upon a number of std lib rounding functions to do
>> it's
>> > work. One of them is "rint" which MSVC used to supply, but for some
>> reason
>> > recent releases have simply dropped it, with no suitable replacement.
>> > If you google for msvc and rint you should find some replacements for
>> that
>> > function.
>>
>> I tried this quickly using naïve (but plausible) rint code
>>
>> double rint(double x)
>> {
>> return floor(x + 0.5);
>> }
>>
>> from
>>
>>
>> http://suncallmoonbright.blogspot.com/2008/12/mingw-to-msvc-case-of-rint.htm
>> l
>>
>> but then I got the error below -and decided someone who knew more about it
>> should look at it ;-)
>>
>> Paul
>>
>>
>> ---
>> Paul A. Bristow,
>> Prizet Farmhouse, Kendal LA8 8AB UK
>> +44 1539 561830 07714330204
>> pbristow_at_[hidden]
>>
>>
>>
>> I:\boost-trunk\boost/numeric/interval/rounded_arith.hpp(108): error C3861:
>> 'to_int': identifier not found
>> I:\boost-trunk\boost/numeric/interval/rounded_arith.hpp(108) :
>> while compiling class template member function 'double
>> boost::numeric::interval_lib::rounded_arith_opp<T>::int_down(const T &)'
>> with
>> [
>> T=double
>> ]
>> I:\boost-trunk\boost/numeric/interval/rounding.hpp(77) : see
>> reference to class template instantiation
>> 'boost::numeric::interval_lib::rounded_arith_opp<T>' being compiled
>> with
>> [
>> T=double
>> ]
>> I:\boost-trunk\boost/numeric/interval/hw_rounding.hpp(59) : see
>> reference to class template instantiation
>> 'boost::numeric::interval_lib::save_state<Rounding>' being compiled
>> with
>> [
>>
>> Rounding=boost::numeric::interval_lib::rounded_arith_opp<double>
>> ]
>>
>>
>> _______________________________________________
>> Boost-users mailing list
>> Boost-users_at_[hidden]
>> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>>
>
>



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net