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 라이브러리에는 inbuilt 함수가 있습니다. – Teja
헤더에서'ddot'를 검색하고 찾은 것을 다시보고하십시오. –