I want to use GotoBLAS2 to sum two vectors (z = x+y, where x and y are two vectors with the same length). I use following code:
#include <stdio.h>
#include <cblas.h>
#include <common.h>
double x[] = {1,2,3};
double y[] = {4,5,6};
void main()
{
int n,i,x_int,y_int=5,a;
n=3;x_int=1;y_int=1;a=1;
cblas_dzxpy(n, a, &x[0], x_int, &y[0], y_int);
for(i=0;i<n;i++) printf("x[%d] = %g\n", i, x[i]);
}
this file is located at some directory "Test" and GotoBLAS2 is at the directory with TEST (not file). Also, I put libgoto2.a in TEST folder. When I want to compile it using following command:
gcc AddSubVectors.c -I../GotoBLAS2 -L../GotoBLAS2 libgoto2.a
I get following error several times:
../GotoBLAS2/cblas.h:270:45: error: unknown type name 'blasint'
it seems I have to link something to gcc but I do not know what and how. Any help is really appreciated. Thanks