Subject: [boost] [math] Undefined reference to promote_args
From: Florian Lindner (mailinglists_at_[hidden])
Date: 2016-09-13 05:40:11


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?

Thanks,
Florian