Page 1 of 1

Linking lapack with my f77 code

PostPosted: Sun Jun 22, 2008 2:20 pm
by Zahra
Hi all,

I should use subroutine ZGEEV in my code. But, while I am trying to compile my code

f77 -o result my-code.f -L/usr/lib -llapack -lblas

I got the following error :(

/tmp/cc4nQ0va.o(.text+0x152f): In function `MAIN__':
: undefined reference to `cmplex_'
collect2: ld returned 1 exit status

I am a complete newbie at using libraries. Can anyone help me?

Cheers,
Zahra

PostPosted: Mon Jun 23, 2008 11:47 am
by Julien Langou
Your LAPACK or BLAS libraries may come from CLAPACK or CBLAS, in
which case you need additional f2c libraries.
Since you have a f77 compiler, the easiest for you is to download
and install LAPACK yourself with your f77 compiler then your compile
line should work.
Julien.

PostPosted: Tue Jun 24, 2008 1:38 pm
by Zahra
Thanks for the reply :)