Menu

compilation under solaris... solution ??

2004-01-14
2012-09-15
  • Thomas Lemaire

    Thomas Lemaire - 2004-01-14

    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

     
    • Thomas Lemaire

      Thomas Lemaire - 2004-01-15

      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

       

Log in to post a comment.