rtv / Stage

Mobile robot simulator
rtv.github.com/Stage
GNU General Public License v2.0
391 stars 175 forks source link

world.cc compile error: call of overloaded ‘abs(const double&)’ is ambiguous #63

Closed mjbogusz closed 7 years ago

mjbogusz commented 8 years ago

The problem originates in using C's stdlib.h (and its abs()) instead of 'proper' C++ cmath. Occured with g++ 6.1.1, on Archlinux x86_64.

This patch solves the problem while modifying the code as less as possible: world_cc_abs.patch.txt

I've encountered another compile errors too but there's already a PR fixing them.

rtv commented 7 years ago

thanks for the fix. We use std::abs() explicitly now.