|
Ublas : |
From: dvir schirman (dvir.boost_at_[hidden])
Date: 2006-05-10 07:50:27
Hi.
I want to use ublas in order to work with vector & matrices.
I am working with cygwin.
I wrote the following simple code, it compiled well, but I tried to link it
it has returned alott of errors.
the first error is:
"/cygdrive/z/test_boost/test_b2.cpp:(.text+0xd): undefined reference to
`std::basic_string<char, std::char_traits<char>, std::allocator<char>
>::size() const'"
And after this one there are alott of similiar ones mostly regarding "std".
Hope youy can help me with this.
Dvir
#include <boost/numeric/ublas/matrix.hpp>
#include <boost/numeric/ublas/io.hpp>
#include <boost/numeric/ublas/matrix_proxy.hpp>
#include <iostream.h>
#include <stdio.h>
namespace ublas = boost::numeric::ublas;
int main ()
{
using namespace boost::numeric::ublas;
using namespace std;
matrix<float> m1 (3, 3);
for (unsigned i = 0; i < m1.size1 (); ++ i)
for (unsigned j = 0; j < m1.size2 (); ++ j)
m1 (i, j) = 3 * i + j;
std::cout<<"m1="<<m1<<endl;
return 1;
}