Previous: Linking programs with the library, Up: Compiling and Linking


2.2.2 Linking with an alternative BLAS library

The following command line shows how you would link the same application with an alternative cblas library called libcblas,

     $ gcc example.o -lgsl -lcblas -lm

For the best performance an optimized platform-specific cblas library should be used for -lcblas. The library must conform to the cblas standard. The atlas package provides a portable high-performance blas library with a cblas interface. It is free software and should be installed for any work requiring fast vector and matrix operations. The following command line will link with the atlas library and its cblas interface,

     $ gcc example.o -lgsl -lcblas -latlas -lm

For more information see BLAS Support.