Today, I’ve installed two popular packages:
Both packages are required when you deal with linear algebra operations, e.g. solving linear equation systems. Originally, both packages were written in FORTRAN, but I want to use them coding in C++. The solution is to create a libraray! There’re a few steps to consider while installing the packages. First, you have to install BLAS, because LAPACK requires it. If you have downloaded both packages, unzip them. Switch to the BLAS folder and execute
$ make
to compile all fortran files. After that, execute
$ mv blas_UNIX.a libblas.a
to rename the created library. Now, you created a library called “libblas.a”. You just copy that file to your library folder. Therefore execute the following command
sudo cp libblas.a /usr/local/lib/
Et voila. You’ve installed the BLAS package. Now switch to the LAPACK folder and adjust the file “make.inc”. If you set all parameter correctly, execute the command
$ make
Now, you created a library e.g. called “lapack_MACOS.a”. Copy that file to your library folder by executing
sudo cp liblapack.a /usr/local/lib/
Congratulation, you’ve installed BLAS and LAPACK on Mac OS!
Note: I’ve installed BLAS and LAPACK operating on Mac OS 10.8.x!