Robert Dorazio
09-13-2004, 01:36 PM
I routinely use the MTL wrapper file, "nrutil_mtl.h" that joins the MTL Vector<> and Matrix<> classes to the NRVec and NRMat classes. Recently, I obtained a compilation error (using GCC 3.0) that seems to have been created by inclusion of this file. Interestingly, the source code has no direct dependence on this file (i.e., the source code compiles and executes fine provided the statement, #include "nr.h", is not present in the source). Has anyone had similar experiences? Here are the compiler errors:
C:\MyC++SourceCode\Extract>mingw32-make
g++.exe -c driver.cc -o driver.o -Ic:/MinGW/include -Ic:/MingGW/include/c++/3.2 -Ic:/Blit
z++-0.7 -Ic:/mtl-2.1.2-21 -Ic:/NumericalRecipes/Cpp210/cpp/other -Ic:/MyC++SourceCode/Util
ities -ftemplate-depth-30 -Wno-deprecated -s -ansi
In file included from c:/NumericalRecipes/Cpp210/cpp/other/nrutil.h:5,
from c:/NumericalRecipes/Cpp210/cpp/other/nr.h:5,
from driver.cc:5:
c:/NumericalRecipes/Cpp210/cpp/other/nrutil_mtl.h:127: warning: `typename
mtl::matrix<T, mtl::rectangle<0, 0>, mtl::dense<0>, mtl::row_major>::type'
is implicitly a typename
c:/mtl-2.1.2-21/mtl/matrix_traits.h: In instantiation of `mtl::linalg_traits<blitz::Array<
bool, 1> >':
c:/MyC++SourceCode/Utilities/bul/Extract.h:104: instantiated from `blitz::Array<T_numtyp
e, 1> bul::extract(const blitz::Array<bool, 1>&, const blitz::Array<T_numtype, 1>&) [with
T = float]'
driver.cc:44: instantiated from here
c:/mtl-2.1.2-21/mtl/matrix_traits.h:197: no type named `dimension' in `class
blitz::Array<bool, 1>'
c:/mtl-2.1.2-21/mtl/matrix_traits.h:199: no type named `value_type' in `class
blitz::Array<bool, 1>'
c:/mtl-2.1.2-21/mtl/matrix_traits.h:201: no type named `sparsity' in `class
blitz::Array<bool, 1>'
c:/mtl-2.1.2-21/mtl/matrix_traits.h:203: no type named `value_type' in `class
blitz::Array<bool, 1>'
mingw32-make: *** [driver.o] Error 1
C:\MyC++SourceCode\Extract>mingw32-make
g++.exe -c driver.cc -o driver.o -Ic:/MinGW/include -Ic:/MingGW/include/c++/3.2 -Ic:/Blit
z++-0.7 -Ic:/mtl-2.1.2-21 -Ic:/NumericalRecipes/Cpp210/cpp/other -Ic:/MyC++SourceCode/Util
ities -ftemplate-depth-30 -Wno-deprecated -s -ansi
In file included from c:/NumericalRecipes/Cpp210/cpp/other/nrutil.h:5,
from c:/NumericalRecipes/Cpp210/cpp/other/nr.h:5,
from driver.cc:5:
c:/NumericalRecipes/Cpp210/cpp/other/nrutil_mtl.h:127: warning: `typename
mtl::matrix<T, mtl::rectangle<0, 0>, mtl::dense<0>, mtl::row_major>::type'
is implicitly a typename
c:/mtl-2.1.2-21/mtl/matrix_traits.h: In instantiation of `mtl::linalg_traits<blitz::Array<
bool, 1> >':
c:/MyC++SourceCode/Utilities/bul/Extract.h:104: instantiated from `blitz::Array<T_numtyp
e, 1> bul::extract(const blitz::Array<bool, 1>&, const blitz::Array<T_numtype, 1>&) [with
T = float]'
driver.cc:44: instantiated from here
c:/mtl-2.1.2-21/mtl/matrix_traits.h:197: no type named `dimension' in `class
blitz::Array<bool, 1>'
c:/mtl-2.1.2-21/mtl/matrix_traits.h:199: no type named `value_type' in `class
blitz::Array<bool, 1>'
c:/mtl-2.1.2-21/mtl/matrix_traits.h:201: no type named `sparsity' in `class
blitz::Array<bool, 1>'
c:/mtl-2.1.2-21/mtl/matrix_traits.h:203: no type named `value_type' in `class
blitz::Array<bool, 1>'
mingw32-make: *** [driver.o] Error 1