我想运行一个简单的lapacke代码:
#include <stdio.h>
#include <lapacke.h>
int main (int argc, const char * argv[])
{
double a[5][3] = {1,1,1,2,3,4,3,5,2,4,2,5,5,4,3};
double b[5][2] = {-10,-3,12,14,14,12,16,16,18,16};
lapack_int info,m,n,lda,ldb,nrhs;
int i,j;
m = 5;
n = 3;
nrhs = 2;
lda = 3;
ldb = 2;
info = LAPACKE_dgels(LAPACK_ROW_MAJOR,'N',m,n,nrhs,*a,lda,*b,ldb);
for(i=0;i<n;i++)
{
for(j=0;j<nrhs;j++)
{
printf("%lf ",b[i][j]);
}
printf("\n");
}
return(info);
}
但我不能,我有以下问题,任何帮助请求? 我编译使用:icc -I / usr / include / x86_64-linux-gnu / c ++ / 4.9 ran_matrix.cpp -o ran_mat
qarni@c4hdn:~$ icc -I/usr/include/x86_64-linux-gnu/c++/4.9 ran_matrix.cpp -o ran_mat
ran_matrix.cpp(2): catastrophic error: cannot open source file "lapacke.h"
#include <lapacke.h>
^
compilation aborted for ran_matrix.cpp (code 4)