Hi,
You should simply add directive #using namespace std;
and #include iostream in inverse order :)
best
 
On Apr 14, 2009, at 11:55 AM, Jianshu Zhang wrote:



Date: Tue, 14 Apr 2009 05:44:58 -0400
From: MAILER-DAEMON@wowbagger.osl.iu.edu
Subject: Undelivered Mail Returned to Sender
To: SRS0=AXzU=AM=hotmail.com=sago_vinson@srs.kundenserver.de

This is the Postfix program at host wowbagger.osl.iu.edu.

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to <postmaster>

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

The Postfix program

<ublas@lists.boost.org>: mail forwarding loop for ublas@lists.boost.org


--Forwarded Message Attachment--
From: sago_vinson@hotmail.com
To: ublas@lists.boost.org
Date: Tue, 14 Apr 2009 09:43:56 +0000
Subject: [ublas] problem regards to using boost binding library for svd in lapack under vc 9.0







Hi, All,

I'm a newbie using ublas library. I want to use the svd function in lapack. After installing boost binding lib and lapack lib for win32. I simply copied some codes from internet. However, it doesn't work and give some wired error information. Can anybody tell me how this could be solved?

codes are:

#include <boost/numeric/bindings/lapack/gesdd.hpp>
#include<boost/numeric/bindings/traits/ublas_matrix.hpp>
#include<boost/numeric/bindings/traits/ublas_vector.hpp>
#include <boost/numeric/ublas/matrix.hpp>
#include <boost/numeric/ublas/vector.hpp>
#include <boost/numeric/ublas/io.hpp>


int main()
{
using namespace boost::numeric::bindings::lapack;
using namespace boost::numeric::ublas;

matrix<double, column_major> A (4,2);
A(0,0)=2;
A(0,1)=4;
A(1,0)=1;
A(1,1)=3;
A(2,0)=0;
A(2,1)=0;
A(3,0)=0;
A(3,1)=0;

std::cout << A << std::end
l;

matrix<double, column_major> U(4,4);
matrix<double, column_major> V(2,2);
vector<double> S(2);
gesdd(A, S, U, V);

std::cout << U << std::endl;
std::cout << S << std::endl;
std::cout << V << std::endl;

return 0;
} 

error information are:

1>c:\programme\boost\boost_1_36_0\boost\numeric\bindings\lapack\gesdd.hpp(180) : error C2039: 'cerr' : is not a member of 'std'
1>c:\programme\boost\boost_1_36_0\boost\numeric\bindings\lapack\gesdd.hpp(180) : error C2065: 'cerr' : undeclared identifier
1>c:\programme\boost\boost_1_36_0\boost\numeric\bindings\lapack\gesdd.hpp(194) : warning C4390: ';' : empty controlled statement found; is this the intent?
1>c:\programme\boost\boost_1_36_0\boost\numeric\bindings\lapack\gesdd.hpp(211) : warning C4390: ';' : empty controlled statement found; is this the intent?

Thanks.


Invit e your mail contacts 
to join your friends list with Windows Live Spaces. It's easy! Try it!


Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy! Try it! <ATT00000.txt>
From: Jianshu Zhang <sago_vinson@hotmail.com>
Date: April 14, 2009 11:43:56 AM CEDT
Subject: [ublas] problem regards to using boost binding library for svd in lapack under vc 9.0
Reply-To: ublas mailing list <ublas@lists.boost.org>


Hi, All,

I'm a newbie using ublas library. I want to use the svd function in lapack. After installing boost binding lib and lapack lib for win32. I simply copied some codes from internet. However, it doesn't work and give some wired error information. Can anybody tell me how this could be solved?

codes are:

#include <boost/numeric/bindings/lapack/gesdd.hpp>
#include<boost/numeric/bindings/traits/ublas_matrix.hpp>
#include<boost/numeric/bindings/traits/ublas_vector.hpp>
#include <boost/numeric/ublas/matrix.hpp>
#include <boost/numeric/ublas/vector.hpp>
#include <boost/numeric/ublas/io.hpp>


int main()
{
using namespace boost::numeric::bindings::lapack;
using namespace boost::numeric::ublas;

matrix<double, column_major> A (4,2);
A(0,0)=2;
A(0,1)=4;
A(1,0)=1;
A(1,1)=3;
A(2,0)=0;
A(2,1)=0;
A(3,0)=0;
A(3,1)=0;

std::cout << A << std::end l;

matrix<double, column_major> U(4,4);
matrix<double, column_major> V(2,2);
vector<double> S(2);
gesdd(A, S, U, V);

std::cout << U << std::endl;
std::cout << S << std::endl;
std::cout << V << std::endl;

return 0;
} 

error information are:

1>c:\programme\boost\boost_1_36_0\boost\numeric\bindings\lapack\gesdd.hpp(180) : error C2039: 'cerr' : is not a member of 'std'
1>c:\programme\boost\boost_1_36_0\boost\numeric\bindings\lapack\gesdd.hpp(180) : error C2065: 'cerr' : undeclared identifier
1>c:\programme\boost\boost_1_36_0\boost\numeric\bindings\lapack\gesdd.hpp(194) : warning C4390: ';' : empty controlled statement found; is this the intent?
1>c:\programme\boost\boost_1_36_0\boost\numeric\bindings\lapack\gesdd.hpp(211) : warning C4390: ';' : empty controlled statement found; is this the intent?

Thanks.


Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy!Try it!_______________________________________________
ublas mailing list
ublas@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/ublas


_______________________________________________
ublas mailing list
ublas@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/ublas