Opened 12 years ago

Closed 12 years ago

#4799 closed Bugs (fixed)

Linker error in math library - rint() missing on MS windows platform

Reported by: larsvmogensen@… Owned by: John Maddock
Milestone: To Be Determined Component: math
Version: Boost 1.36.0 Severity: Showstopper
Keywords: rint() Cc:

Description

I tried solving this through the forum, but it seems to be a bug more than newbe problems.

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?

1>------ Build started: Project: boostfindzero, Configuration: Debug Win32 ------

1>Compiling... 1>findroot_demo.cpp 1>Linking... 1>findroot_demo.obj : error LNK2019: unresolved external symbol _rint referenced in function "public: static double cdecl boost::numeric::interval_lib::detail::x86_rounding::to_int(double const &)" (?to_int@x86_rounding@detail@interval_lib@numeric@boost@@SANABN@Z) 1>D:\dokumenter\lvm_AM\Visual Studio 2008\Projects\boostfindzero\Debug\boostfindzero.exe : fatal error LNK1120: 1 unresolved externals 1>Build log was saved at "file://d:\dokumenter\lvm_AM\Visual Studio 2008\Projects\boostfindzero\boostfindzero\Debug\BuildLog.htm" 1>boostfindzero - 2 error(s), 0 warning(s) ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

From what I can see in the source this is also a problem with BOOST 1.44.0 version. I am currently limited to the 1.36.0, but will upgrade if this is solved in the next version.

Maybe BOOST developers should implement a rint() function for the MS Windows users?

Change History (2)

comment:1 by John Maddock, 12 years ago

I believe this is fixed in SVN Trunk (see https://svn.boost.org/trac/boost/browser/trunk/boost/numeric/interval/detail/msvc_rounding_control.hpp), but unfortunately Boost.Interval hasn't been actively maintained for a while :-(

I think it's probably too late to fix this in time for 1.45, but I'll try and get the fix into 1.46.

comment:2 by John Maddock, 12 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.