Page 1 of 1

Undefined reference to `dlatms_'

PostPosted: Tue Feb 16, 2016 8:00 am
by mabalenk
Dear all,

I would like to use the LAPACK function "LAPACKE_dlatms_work()" to generate a random SPD matrix. However, my program fails at the linking stage with the following error message:

Code: Select all
gcc -I /opt/lapacke/include -I /opt/blas/include   -L /opt/lapacke/lib -L /opt/lapack/lib -L /opt/blas/lib   cholesky_tile_blas.c -llapacke -llapack -lgfortran -lblas -lm   -o cholesky_tile_blas
/opt/lapacke/lib/liblapacke.a(lapacke_dlatms_work.o): In function `LAPACKE_dlatms_work':
lapacke_dlatms_work.c:(.text+0x155): undefined reference to `dlatms_'
lapacke_dlatms_work.c:(.text+0x272): undefined reference to `dlatms_'
collect2: error: ld returned 1 exit status
Makefile:42: recipe for target 'cholesky_tile_blas' failed
make: *** [cholesky_tile_blas] Error 1

In the source code I do include <lapacke.h>. Thank you for your attention and help.