Now that things are running a bit better, I can post the complete error
messages. Here's the one I get with current trunk:
[ 69%] Building CXX object src/wui/CMakeFiles/wui.dir/mapviewpixelfunctions.cc.o
/usr/home/bsd/dev/widelands/src/wui/mapviewpixelfunctions.cc:114:16: error: use
of undeclared identifier 'abs'; did you mean 'fabs'?
uint32_t dx = abs(a.x - b.x), dy = abs(a.y - b.y);
^~~
fabs
/usr/include/math.h:259:8: note: 'fabs' declared here
double fabs(double) __pure2;
^
/usr/home/bsd/dev/widelands/src/wui/mapviewpixelfunctions.cc:114:37: error: use
of undeclared identifier 'abs'; did you mean 'fabs'?
uint32_t dx = abs(a.x - b.x), dy = abs(a.y - b.y);
^~~
fabs
/usr/include/math.h:259:8: note: 'fabs' declared here
double fabs(double) __pure2;
^
2 errors generated.
Then, if I prefix it with std:: I get the following:
/usr/home/bsd/dev/widelands/src/wui/mapviewpixelfunctions.cc:114:16: error:
call to 'abs' is ambiguous
uint32_t dx = std::abs(a.x - b.x), dy = std::abs(a.y - b.y);
^~~~~~~~
/usr/include/c++/v1/cmath:659:1: note: candidate function
abs(float __x) _NOEXCEPT {return fabsf(__x);}
^
/usr/include/c++/v1/cmath:663:1: note: candidate function
abs(double __x) _NOEXCEPT {return fabs(__x);}
^
/usr/include/c++/v1/cmath:667:1: note: candidate function
abs(long double __x) _NOEXCEPT {return fabsl(__x);}
^
/usr/home/bsd/dev/widelands/src/wui/mapviewpixelfunctions.cc:114:42: error:
call to 'abs' is ambiguous
uint32_t dx = std::abs(a.x - b.x), dy = std::abs(a.y - b.y);
^~~~~~~~
/usr/include/c++/v1/cmath:659:1: note: candidate function
abs(float __x) _NOEXCEPT {return fabsf(__x);}
^
/usr/include/c++/v1/cmath:663:1: note: candidate function
abs(double __x) _NOEXCEPT {return fabs(__x);}
^
/usr/include/c++/v1/cmath:667:1: note: candidate function
abs(long double __x) _NOEXCEPT {return fabsl(__x);}
^
2 errors generated.
I've looked over this again after reading your comment, and it seems to me that
std::abs will require some sort of float number, while you metioned cstdlib can
be used for integers, so I'll simply try with that instead.
--
https://code.launchpad.net/~widelands-dev/widelands/freebsd/+merge/225867
Your team Widelands Developers is subscribed to branch
lp:~widelands-dev/widelands/freebsd.
_______________________________________________
Mailing list: https://launchpad.net/~widelands-dev
Post to : [email protected]
Unsubscribe : https://launchpad.net/~widelands-dev
More help : https://help.launchpad.net/ListHelp