The problem to bompile it++ under solaris with gcc3.3 comes from the round function which does not exist in the std or anywhere else... These lines from elmathfunc.h (line ~230) should be modified, here I use the floor function which comes from the std :
#else
//! Round to nearest integer
//inline vec round(const vec &x) {return vec_function((double(*)(double)) ::round,x);}
inline vec round(const vec &x) {return vec_function((double(*)(double)) std::floor,x);}
//! Round to nearest integer
//inline mat round(const mat &x) {return mat_function((double(*)(double)) ::round,x);}
inline mat round(const mat &x) {return mat_function((double(*)(double)) std::floor,x);}
#endif
hope it cam help anybody else working under solaris
thomas
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The problem to bompile it++ under solaris with gcc3.3 comes from the round function which does not exist in the std or anywhere else... These lines from elmathfunc.h (line ~230) should be modified, here I use the floor function which comes from the std :
#else
//! Round to nearest integer
//inline vec round(const vec &x) {return vec_function((double(*)(double)) ::round,x);}
inline vec round(const vec &x) {return vec_function((double(*)(double)) std::floor,x);}
//! Round to nearest integer
//inline mat round(const mat &x) {return mat_function((double(*)(double)) ::round,x);}
inline mat round(const mat &x) {return mat_function((double(*)(double)) std::floor,x);}
#endif
hope it cam help anybody else working under solaris
thomas
One more point to really get a round function :
replace
vec_function((double(*)(double)) std::floor,x)
vec_function((double(*)(double)) std::floor,x+0.5)
thomas