Re: problem compiling MTL example: dot_prod.cc
Rene van Paassen <[email protected]> Tue, 31 Aug 2010 14:43:58 +0200
| Newsgroups | gmane.comp.lib.mtl.devel |
|---|---|
| Message-ID | <[email protected]> |
By now, you need to apply a few patches to mtl to get it to work correctly with newer gcc Check my mtl package on software.opensuse.org (select search options, uncheck exclude home projects) The source of the package shows you the necessary patches On 30 August 2010 16:13, Dorazio,Robert <[email protected]> wrote: > I just installed MTL 2.1.2-22, and I cannot seem to compile one of the MT= L code examples =A0(see errors below). =A0 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 =A0 -I~/usr/local/includ= e/mtl =A0-s -ansi -pedantic-errors > In file included from /usr/local/include/mtl/matrix.h:41, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 from /usr/local/include/mtl/mtl.h:40, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 from dot_prod.cc:29: > /usr/local/include/mtl/envelope2D.h:72: error: declaration of =91typedef = struct mtl::twod_tag mtl::envelope2D<T>::dimension=92 > /usr/local/include/mtl/dimension.h:19: error: changes meaning of =91dimen= sion=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&, cons= t VecY&, T, mtl::dense_tag, mtl::dense_tag) [with VecX =3D mtl::external_ve= c<double, 0, unsigned int>, VecY =3D mtl::external_vec<double, 0, unsigned = int>, T =3D double]=92: > /usr/local/include/mtl/mtl.h:3224: =A0 instantiated from =91T mtl::dot(co= nst VecX&, const VecY&, T) [with VecX =3D mtl::external_vec<double, 0, unsi= gned int>, VecY =3D mtl::external_vec<double, 0, unsigned int>, T =3D doubl= e]=92 > /usr/local/include/mtl/mtl.h:3239: =A0 instantiated from =91typename VecX= ::value_type mtl::dot(const VecX&, const VecY&) [with VecX =3D main()::Vec,= VecY =3D main()::Vec]=92 > dot_prod.cc:61: =A0 instantiated from here > /usr/local/include/mtl/mtl.h:3146: error: dependent-name =91mtl::dim_n::R= ET=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 =A032611-0339 > Phone: =A0352-392-3081 > Web site: =A0http://ifasstat.ifas.ufl.edu/DorazioWebSite/publications.sht= ml > _______________________________________________ > This list is archived at http://www.osl.iu.edu/MailArchives/mtl-devel/ > _______________________________________________ This list is archived at http://www.osl.iu.edu/MailArchives/mtl-devel/