I am currently using the interval library and the following linker
errors pop up:
error LNK2028: unresolved token (0A000596) "extern "C" double __cdecl
rint(double)" (?rint@@$$J0YANN@Z) 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@@$$FSANABN@Z)
Internal.obj Docs.Evaluation
error LNK2019: unresolved external symbol "extern "C" double __cdecl
rint(double)" (?rint@@$$J0YANN@Z) 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@@$$FSANABN@Z)
Internal.obj Docs.Evaluation
rint does not show up in the MSDN documentation. This seems to be
another example of Microsofts C99 compliance problems if I am not
mistaken. I found a bug in the bug-database (#446: Bugs: MSVC support
(closed: Wont Fix)) but when I try to view the bugreport all I get is a
"Trac detected an internal error: TypeError: a float is required".
Guillaume Melquiond seems to have posted a workaround in
https://sourceforge.net/tracker/?func=detail&atid=107586&aid=1246358&group_id=7586
but I cannot view this either, because this artifact is private and can
be viewed only be groupmembers of a certain group (no idea which one).
Would it not be a solution to simply add an rint implementation to the
interval library?
Best regards
Stephan
--
Stephan Puchegger
Dynamics of Condensed Systems
Faculty of Physics
University of Vienna
Strudlhofgasse 4, A-1090 Vienna
Tel: ++43 (0) 1 4277 51352
Email: stephan....@univie.ac.at
_______________________________________________
Boost-users mailing list
Boost...@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users
Nod, MS used to have a rint function and then removed it, apparently without
a replacement!
I'm using this:
#if BOOST_MSVC < 1400
extern "C" { double rint(double); }
#else
inline double rint(double x)
{
_asm FLD [x] ;
_asm FRNDINT ;
//_asm RET ;
}
#endif
In msvc_rounding_control.hpp.
HTH, John.