Boost logo

Boost :

Subject: Re: [boost] [math] Undefined reference to promote_args
From: John Maddock (jz.maddock_at_[hidden])
Date: 2016-09-13 13:18:03


On 13/09/2016 10:40, Florian Lindner wrote:
> Hello,
>
> when compiling a file that uses float_distance from
> #include <boost/math/special_functions/relative_difference.hpp>
>
> I get a linking error:
>
> undefined reference to `boost::math::tools::promote_args<double, double, float, float, float, float>::type
> boost::math::float_distance<double, double>(double const&, double const&)'
>
> I try to add all boost_math libs I could find, but none helped:
>
> -lboost_system -lboost_filesystem -lboost_math_tr1 -lboost_math_c99 -lboost_math_c99
>
> Since float_distance is not a C99 / TR1 function, shouldn't boost.math work as header only?
>
> What is the problem here?

As per
http://www.boost.org/doc/libs/1_61_0/libs/math/doc/html/math_toolkit/next_float/float_distance.html

You need to includeboost/math/special_functions/next.hpp

HTH, John.
>
> Thanks,
> Florian
>
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
>


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk