Blas and Lapack may be installed on an Ubuntu system using the instructions at:
Generalized Eigenvalue Problem
* * *
C++ programs that use Lapack can be compiled in Terminal or Bash shell mode via:
g++ file_in -o file_out -lgfortran -llapack -lm
where
file_in is the source code
file_out is the output executable file
In addition, linker option -lblas may be needed by the source code.
Verify that the output file exists:
ls -lt
Then run the program:
./file_out
* * *
The source code can also be built in the Code::Blocks IDE.
The following lines must be added to the linker options:
-lgfortran
-lblas (if needed by source code)
-llapack
Notes:
1. Suggest running Ubuntu with Gnome shell rather than Unity in order to avoid Code::Blocks missing menu bar problem.
2. Failure to include the linker options will result in errors such as:
ilaenv.f undefined reference to ‘_gfortran_compare_string’
* * *
Tom Irvine