1
我在我的代碼中調用BLAS函數,包含BLAS庫,並且我的代碼顯然有點故障,因爲編譯器吐出了錯誤:「ddot沒有在此範圍內聲明。 「在BLAS庫中調用DDOT函數
#include <stdio.h>
#include <stdlib.h>
#include <blas.h>
int main()
{
double m[10],n[10];
int i;
int result;
printf("Enter the elements into first vector.\n");
for(i=0;i<10;i++)
scanf("%lf",&m[i]);
printf("Enter the elements into second vector.\n");
for(i=0;i<10;i++)
scanf("%lf",&n[i]);
result = ddot(m,n);
printf("The result is %d\n",result);
return 0;
}
關於如何正確修復此代碼的任何想法?
與您的假設相反,看起來'ddot'沒有在''中聲明。你有沒有在標題中找到它? –
但是blas庫有內置函數。 – Teja
在標題中搜索'ddot',並用你發現的內容回報。 –