Installing CLAPACK 3.2.1 on MacOS Lion

Open discussion regarding features, bugs, issues, vendors, etc.

Installing CLAPACK 3.2.1 on MacOS Lion

Postby majorana » Wed Nov 02, 2011 11:14 pm

Hi,
I am trying to install the libraries on the macbook and, when I tried to compile the example program (clapack FAQ 1.9) using the following command
gcc -Wall -o test2 test.c -I./INCLUDE -L. -llapack_LINUX -lblas_LINUX -lf2c -lm


I have found the output

test.c:14: warning: return type defaults to ‘int’
test.c: In function ‘main’:
test.c:54: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘integer’
test.c:54: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘integer’
test.c:31: warning: unused variable ‘MN’
test.c:29: warning: unused variable ‘mn’
ld: library not found for -llapack_LINUX
collect2: ld returned 1 exit status


The file test.c is in the same folder as lapack_LINUX.a and also the other .a files (blas_LINUX.a and /F2CLIBS/libf2c.a) are present. What is the problem? Can it be generated from a wrong installation procedure?
majorana
 
Posts: 1
Joined: Wed Nov 02, 2011 11:02 pm

Re: Installing CLAPACK 3.2.1 on MacOS Lion

Postby admin » Tue Nov 29, 2011 12:40 am

you need to change the name of the libraries so that they start with lib:
Change the name (for example) from lapack_LINUX.a to libmylapack.a and blas_LINUX.a to libmyblas.a
then do a
gcc -Wall -o test2 test.c -I./INCLUDE -L. -lmylapack -lmyblas -lf2c -lm
admin
Site Admin
 
Posts: 504
Joined: Wed Dec 08, 2004 7:07 pm


Return to User Discussion

Who is online

Users browsing this forum: Bing [Bot], Yahoo [Bot] and 6 guests