## Re: [Vxl-users] Problem with Matrix Multiplications

 Re: [Vxl-users] Problem with Matrix Multiplications From: Amitha Perera - 2005-04-27 16:26:43 ```On Wed 27 Apr 2005, David McKinnon wrote: > Hi, > I have experienced a problem when trying to use vgl_p_matrix to > perform a matrix multiplication within the method vgl_p_matrix > operator*(const vgl_p_matrix& P, const vgl_h_matrix_3d& H). The > linker error I receive is : > test_p_matrix.o(.text+0x9d2): In function `test_general_projection()': > : undefined reference to `vgl_p_matrix > operator*(vgl_p_matrix const&, vgl_h_matrix_3d > const&)' This is probably due to the function not being instantiated. At the bottom of vgl_p_matrix.txx, try replacing #define VGL_P_MATRIX_INSTANTIATE(T) \ template class vgl_p_matrix; \ template vcl_ostream& operator << (vcl_ostream& s, const vgl_p_matrix& h); \ template vcl_istream& operator >> (vcl_istream& s, vgl_p_matrix& h) with #define VGL_P_MATRIX_INSTANTIATE(T) \ template class vgl_p_matrix; \ template vgl_p_matrix operator*(const vgl_p_matrix& P, const vgl_h_matrix_3d& H); \ template vcl_ostream& operator << (vcl_ostream& s, const vgl_p_matrix& h); \ template vcl_istream& operator >> (vcl_istream& s, vgl_p_matrix& h) and recompile vgl_algo. I'll commit this change in a few minutes. Amitha. ```

 [Vxl-users] Problem with Matrix Multiplications From: David McKinnon - 2005-04-27 06:02:53 ```Hi, I have experienced a problem when trying to use vgl_p_matrix to perform a matrix multiplication within the method vgl_p_matrix operator*(const vgl_p_matrix& P, const vgl_h_matrix_3d& H). The linker error I receive is : test_p_matrix.o(.text+0x9d2): In function `test_general_projection()': : undefined reference to `vgl_p_matrix operator*(vgl_p_matrix const&, vgl_h_matrix_3d const&)' using gcc version 3.4.2 20041017. I saw some threads talking about the problems with fixed matrix multiplications with MSVC6.0 could this be the same? David McKinnon... ```
 Re: [Vxl-users] Problem with Matrix Multiplications From: Amitha Perera - 2005-04-27 16:26:43 ```On Wed 27 Apr 2005, David McKinnon wrote: > Hi, > I have experienced a problem when trying to use vgl_p_matrix to > perform a matrix multiplication within the method vgl_p_matrix > operator*(const vgl_p_matrix& P, const vgl_h_matrix_3d& H). The > linker error I receive is : > test_p_matrix.o(.text+0x9d2): In function `test_general_projection()': > : undefined reference to `vgl_p_matrix > operator*(vgl_p_matrix const&, vgl_h_matrix_3d > const&)' This is probably due to the function not being instantiated. At the bottom of vgl_p_matrix.txx, try replacing #define VGL_P_MATRIX_INSTANTIATE(T) \ template class vgl_p_matrix; \ template vcl_ostream& operator << (vcl_ostream& s, const vgl_p_matrix& h); \ template vcl_istream& operator >> (vcl_istream& s, vgl_p_matrix& h) with #define VGL_P_MATRIX_INSTANTIATE(T) \ template class vgl_p_matrix; \ template vgl_p_matrix operator*(const vgl_p_matrix& P, const vgl_h_matrix_3d& H); \ template vcl_ostream& operator << (vcl_ostream& s, const vgl_p_matrix& h); \ template vcl_istream& operator >> (vcl_istream& s, vgl_p_matrix& h) and recompile vgl_algo. I'll commit this change in a few minutes. Amitha. ```