First, you may install liblapack-dev
and libblas-dev
(dev means the libraries and the include files).
Check that it is not installed yet. It is likely if you have files such as /usr/lib/liblapack.a
and /usr/lib/libblas.a
To install liblapack-dev
and libblas-dev
, you may use the package manager called synaptic
. According to http://ubuntuforums.org/showthread.php?t=1505249,
"Go to: System -> Synaptic -> Administration -> Package Manager ->
search on lapack (and/or blas), and mark for installation:
libblas3gf
libblas-doc
libblas-dev
liblapack3gf
liblapack-doc
liblapack-dev
-> Apply "
(it is the usual way to install software on Debian or Ubuntu if you are root.)
The package manager will ask for your administrator's password "root".
Then, you may install lapack++
. According to http://lapackpp.sourceforge.net/ , open a Terminal and write (press enter at end of line) :
./configure --prefix=/your/install/path
make
make install
if you face something like permission denied
after typing make install
, it may be because you do not have the right to modify a folder. You may use sudo make install
to do it as administrator, but you really need to trust the origin of the software to do so...security...Best advice may be to change /your/install/path
for something like /home/mylogin/softs/lapackpp
and then add -L /home/mylogin/softs/lapackpp/lib -I /home/mylogin/softs/lapackpp/include
to build and link the code. -I
means add to include search path
and -L
means add to library search path
...you still need to trust the software, but it's less risky for the operating system that sudo
.
To build your code, go to the right folder and type something like
gcc main.c -o main -L /home/mylogin/softs/lapackpp/lib -I /home/mylogin/softs/lapackpp/include -llapackpp -llapack -lblas -lm
If you are not "root", download blas/lapack and build it ! It is exactly the same procedure as lapackpp. But, as you install lapackpp, you may need to add options to -configure
...to signal where these libraries are.
Tell us what happened !
Bye,
Francis