1. download "lapackpp-2.5.3.tar.gz" form http://sourceforge.net/projects/lapackpp/
2. uncompress and install
tar -xvf lapackpp-2.5.3.tar.gz
cd lapackpp-2.5.3
./configure --with-prefix=(path to the directory)
make
make install
3. fix some bugs in the code
cd (path to the directory)/include/lapackpp
perl -pi -w -e 's//"laversion.h"/g;' *
perl -pi -w -e 's//"f2c.h"/g;' *
perl -pi -w -e 's//"lafnames.h"/g;' *
perl -pi -w -e 's//"lacomplex"/g;' *
4. test a simple program
file name : "test.cpp"
code:
#include <lapackpp/lapackpp.h> #include <iostream> using namespace std; int main() { int i,j,size; size = 4; LaGenMatDouble A(size,size); for (i=0;i<size;i++){ for (j=0;j<size;j++) cout << A(i,j) <<' '; cout << endl; } return 0; }
compile:
g++ test.cpp -I(path to the directory)/include -L(path to the directory)/lib -llapackpp
./a.out
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
No comments:
Post a Comment