Τρίτη 23 Νοεμβρίου 2010

CLAPACK Installation in Netbeans,LINUX

Just to save a couple of hours of sleep for some people like me.

1)Download clapack.tgz from http://www.netlib.org/clapack/

2)Extract and call "make" inside the main directory

3)Call the following in terminal:

cp lapack_LINUX.a liblapack_LINUX.a

cp blas_LINUX.a libblas_LINUX.a

ranlib libblas_LINUX.a

ranlib liblapack_LINUX.a

cd F2CLIBS/

cp libf2c.a liblibf2c.a

ranlib liblibf2c.a

cp liblibf2c.a ../

4)Create new C Project in Netbeans

5)Change the makefile to contain only this:

CC = gcc

ROOTPATH = /path/to/clapack

main:main.o

$(CC) -o ./dist/Debug/GNU-Linux-x86/NAME_OF_PROJECT/main.c -I$(ROOTPATH)/INCLUDE -L$(ROOTPATH) -llapack_LINUX -lblas_LINUX -llibf2c -lm

Very helpful topic:

http://icl.cs.utk.edu/lapack-forum/viewtopic.php?f=2&t=2020