I got another problem of linking when I try to use the getrf function:
zgetrf.c:7: warning: type defaults to 'int' in declaration of 'zgetrf_'
zgetrf.c: In function 'main':
zgetrf.c:25: warning: 'info' is used uninitialized in this function
lapack_LINUX.a(zgetrf.o): In function `zgetrf_':
zgetrf.f:(.text+0x608): undefined reference to `ztrsm_'
zgetrf.f:(.text+0x6cc): undefined reference to `zgemm_'
lapack_LINUX.a(zgetf2.o): In function `zgetf2_':
zgetf2.f:(.text+0x1a0): undefined reference to `izamax_'
zgetf2.f:(.text+0x214): undefined reference to `zswap_'
zgetf2.f:(.text+0x2a0): undefined reference to `zgeru_'
zgetf2.f:(.text+0x51c): undefined reference to `zscal_'
collect2: ld returned 1 exit status
make: *** [zgetrf] Error 1
Here is the code I used:
- Code: Select all
typedef struct {
double real, imag;
}doublecomplex;
extern zgetrf_( int, int, doublecomplex*, int, int*, int*);
int main() {
int i;
int* info;
int pivot[8];
doublecomplex a[4*4];
for(i=0;i<4*4;i++) {
a[i].real=i*1.0; a[i].imag=i*1.0;
}
zgetrf_(4,4,a,4,pivot,info);
return 0;
}
and the command for the compilation:
gcc -Wall zgetrf.c blas_LINUX.a lapack_LINUX.a libg2c.a _o zgetrf -lm -O3
I made a previous test with the function zgemm which was a success. I used the same command for compilation, so it's quiet strange to see that here, it didn't found the definition of "zgemm_" which is needed for this BLAS function.
Any ideas?
NB: I'm using lapack 3.1.1
John.

