From: Riccardo Lattanzi <lattanzi@MIT.EDU>  20050413 19:08:27

Quoting Gehua Yang <yangg2@...>: > > > One example you could look at is vnl_matrix+vnl_rational.cxx, which > include vnl_rational_traits.h. vnl_rational is also a nonstandard > class. But by defining the vnl_math_squared_magnitude & vnl_math_abs > functions in vnl_rational_traits.{h,cxx}, it is able to instantiate > vnl_matrix<vnl_rational>. Second, vnl_rational didn't define any > numeric limits. My intuition is you don't need that either. Hence, your > case is only a bit more difficult than this example: vcl_sqrt . The > solution will be change all occurance of vcl_sqrt to vnl_math_sqrt. > Hi, thanks again. I tried to implement your suggestion bu it seems the error is still there. Here is what I've done: I subs vcl_sqrt with vnl_math_sqrt and I declared inline vnl_math_sqrt in vnl_math.h in a way that allows me to avoid errors (not a definitive declarartion: the function doesn't do anything). I added the files: vnl_mpreal_traits.h vnl_mpreal_traits.cxx vnl_mpcomplex_traits.h vnl_mpcomplex_traits.cxx vnl_matrix+mp_real.cxx vnl_matrix+mp_complex.cxx which are adaptation of vnl_rational_traits.h, vnl_rational_traits.h and vnl_matrix+vnl_rational.cxx to the cases of mp_complex and mp_real. However I still get the usual errors related to vnl_unary_function...maybe I need an adhoc specialization of vnl_unary_function. In fact know it gives the error right after vnl_unary_function+double.vnl_vector+double.cxx, which shouldn't be related to mp_complex and mp_real. WHAT DO YOU THINK? If anybody wants to try by himself, the multiprecision library can be downloaded at http://crd.lbl.gov/~dhbailey/mpdist/ and it's a very small package. > By the way, VC6 is a broken compiler and its error messages usually do > not make any sense. Is it convenient for you to get another compiler, > such as Visual Studio .Net or GCC 3.x? > You're right and I'm planning to repeat everything on GCC as soon as I have sometime. Thanks a lot, Riccardo 