This may sound like a silly question, but I was not able to #include cblas.h and lapacke.h header in the same file. It gives me the following message:
OpenBLAS/lapack-netlib/LAPACKE/include/lapack.h:2374:6: error: conflicting types for 'cgesv_'
void LAPACK_cgesv(
^
OpenBLAS/lapack-netlib/LAPACKE/include/lapack.h:2373:22: note: expanded from macro 'LAPACK_cgesv'
#define LAPACK_cgesv LAPACK_GLOBAL(cgesv,CGESV)
^
OpenBLAS/lapack-netlib/LAPACKE/include/lapacke_mangling.h:12:39: note: expanded from macro 'LAPACK_GLOBAL'
#define LAPACK_GLOBAL(lcname,UCNAME) lcname##_
^
<scratch space>:303:1: note: expanded from here
cgesv_
^
OpenBLAS/common_interface.h:687:5: note: previous declaration is here
int BLASFUNC(cgesv)(blasint *, blasint *, float *, blasint *, blasint *, float *, blasint *, blasint *);
^
OpenBLAS/common.h:191:24: note: expanded from macro 'BLASFUNC'
#define BLASFUNC(FUNC) FUNC##_
When using default BLAS and LAPACKE headers from my Linux machine, i.e., those located in /usr/include, it works fine.