From: Wheeler, Fred (Research) <wheeler@cr...>  20021017 17:00:39

MSVC 6 has been having some trouble with VXL the past couple of days. There is a problem with multiplying two vnl_matrix_fixed objects. I've been poking at this, but do not know enough about the vnl regular/fixed magic to fix it. The MSVC 6 nightly build has not been reporting in, so this problem has not appeared on the dashboard. One place where the problems occurs is in oxl/mvl/FMPlanarNonLinFun.obj, function FMPlanarNonLinFun::params_to_fmatrix_awf. I've listed that function below, with several extra statements I've added that may shed some light on what the problem is. The comments I've inserted should explain. vnl compiles and tests fine in msvc 6. It's other code that uses vnl that exhibits this problem. Usually I see the problem multiplying two vnl_double_3x3 objects, but they are of course typedefed to vnl_matrix_fixed<double,3,3>. Thanks, Fred Wheeler // // Private Function: Construct the fundamental matrix from the 6 parameters. // See FMatrixPlanar for more details. // FMatrixPlanar FMPlanarNonLinFun::params_to_fmatrix_awf(const vnl_vector<double>& params) { const double* v = params.data_block(); vnl_cross_product_matrix L(v); vnl_cross_product_matrix E1(v+3); vnl_cross_product_matrix E2(v+6); // the following statement, which was already in this file, gives // this error in MSVC 6: // C:\cygwin\home\wsroot\work_vxl\vxl_src\oxl\mvl\FMPlanarNonLinFun.cxx(317) // : error C2678: binary '*' : no operator defined which takes a // lefthand operand of type 'class vnl_cross_product_matrix' (or // there is no acceptable conversion) vnl_matrix<double> fmat = E2 * L * E1; /* BEGIN new test statements */ // same error for this smaller statement E2 * L; // casting the left side to vnl_matrix<double> works // this statement compiles fine vnl_matrix<double> (E2) * L; // casting the right side to vnl_matrix<double> also works // this statement also compiles fine E2 * vnl_matrix<double> (L); // multiplying by a vector compiles fine vnl_double_3 x; E2 * x; /* END new test statements */ fmat /= fmat.fro_norm(); return FMatrixPlanar(fmat); }  Fred Wheeler, GE CRD, KWC303 Phone: 5183877225 (GE Internal Dialcom: 8*8337225) Fax: 5183874042 (GE Internal Dialcom: 8*8334042) 