problem compiling MTL example: dot_prod.cc

"Dorazio,Robert" <[email protected]> Mon, 30 Aug 2010 10:13:43 -0400
Newsgroups gmane.comp.lib.mtl.devel
Message-ID <476849E2235E194F92F1CFB576C0615162858A197C@UFEXCH-MBXCL01.ad.ufl.edu>
I just installed MTL 2.1.2-22, and I cannot seem to compile one of the MTL =
code examples  (see errors below).   Can somebody provide assistance please?

My operating system is 64-bit Ubuntu 10.04 and my compiler is gcc 4.4.


g++ -c dot_prod.cc -o dot_prod.o -I~/usr/include   -I~/usr/local/include/mt=
l  -s -ansi -pedantic-errors =

In file included from /usr/local/include/mtl/matrix.h:41,
                 from /usr/local/include/mtl/mtl.h:40,
                 from dot_prod.cc:29:
/usr/local/include/mtl/envelope2D.h:72: error: declaration of =91typedef st=
ruct mtl::twod_tag mtl::envelope2D<T>::dimension=92
/usr/local/include/mtl/dimension.h:19: error: changes meaning of =91dimensi=
on=92 from =91class mtl::dimension<typename mtl::dense1D<T, 0>::size_type, =
0, 0>=92
In file included from dot_prod.cc:29:
/usr/local/include/mtl/mtl.h: In function =91T mtl::dot(const VecX&, const =
VecY&, T, mtl::dense_tag, mtl::dense_tag) [with VecX =3D mtl::external_vec<=
double, 0, unsigned int>, VecY =3D mtl::external_vec<double, 0, unsigned in=
t>, T =3D double]=92:
/usr/local/include/mtl/mtl.h:3224:   instantiated from =91T mtl::dot(const =
VecX&, const VecY&, T) [with VecX =3D mtl::external_vec<double, 0, unsigned=
 int>, VecY =3D mtl::external_vec<double, 0, unsigned int>, T =3D double]=
=92
/usr/local/include/mtl/mtl.h:3239:   instantiated from =91typename VecX::va=
lue_type mtl::dot(const VecX&, const VecY&) [with VecX =3D main()::Vec, Vec=
Y =3D main()::Vec]=92
dot_prod.cc:61:   instantiated from here
/usr/local/include/mtl/mtl.h:3146: error: dependent-name =91mtl::dim_n::RET=
=92 is parsed as a non-type, but instantiation yields a type
/usr/local/include/mtl/mtl.h:3146: note: say =91typename mtl::dim_n::RET=92=
 if a type is meant
make: *** [dot_prod.o] Error 1



Robert M. Dorazio
Southeast Ecological Science Center, USGS
&
Department of Statistics, University of Florida
Gainesville, FL  32611-0339
Phone:  352-392-3081
Web site:  http://ifasstat.ifas.ufl.edu/DorazioWebSite/publications.shtml
_______________________________________________
This list is archived at http://www.osl.iu.edu/MailArchives/mtl-devel/