I found I had to include the ublas config header before any ublas headers to get things
to work properly.
#include
Hello,
Could anybody help me with my first compilation of a simple code using MATRIX class from uBLAS library?
Namely, I can't set all the "include" properly. Have a look at the code snipet:
---------------------------------------------------------------------------------- #include
#include #include
int main(int argc, char *argv[]) { using namespace boost::numeric::ublas; matrix<double> m (3, 3); for (int i = 0; i < m.size1 (); ++ i) for (int j = 0; j < m.size2 (); ++ j) m (i, j) = 3 * i + j; std::cout << m << std::endl; } ------------------------------------------------------------------------------------
I get an error message: main.cpp:21:42: boost/numeric/ublas/matrix.hpp: No such file or directory
I use gcc/g++ on i386-linux and I set a parameter of the compiler to:
--x-includes=/home/hurak/Documents/cpluspluswork/boost_1_29_0/
which is exactly the parent directory of "boost/numeric/ublas/matrix.hpp".
Could you please explain to me what is still missing? I cannot find any example on the BOOST web. I am not much experienced in all this "include" stuff. Before delving deeper into the compiler options I would like to know if everything else is correct.
Thanks Zdenek Hurak
Info: http://www.boost.org Wiki: http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl Unsubscribe: mailto:boost-users-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/