I am trying to use OpenBLAS libraries. I have downloaded the pre compiled libraries OpenBLAS-v0.2.14-Win64-int64.zip from http://sourceforge.net/projects/openblas/files/v0.2.14/. I extracted the archives to my C:\ directory. Then I've tryied to run this simple c program:
#include <cblas.h>
#include <stdio.h>
void main()
{
int i=0;
double A[6] = {1.0,2.0,1.0,-3.0,4.0,-1.0};
double B[6] = {1.0,2.0,1.0,-3.0,4.0,-1.0};
double C[9] = {.5,.5,.5,.5,.5,.5,.5,.5,.5};
cblas_dgemm(CblasColMajor, CblasNoTrans, CblasTrans,3,3,2,1,A, 3, B, 3,2,C,3);
for(i=0; i<9; i++){
printf("%lf ", C[i]);}
printf("\n");
}
using this command:
C:\Users\MWAHAHA\Documents\Programas>x86_64-w64-mingw32-gcc -o hello -IC:\OpenBLAS-v0.2.14-Win64-int64\include -LC:\OpenBLAS-v0.2.14-Win64-int64\lib\libopenblas -libopenblas testeoblas.c
and got the following message:
C:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/5.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -libopenblas
collect2.exe: error: ld returned 1 exit status
Also, if I use this command:
C:\Users\MWAHAHA\Documents\Programas>x86_64-w64-mingw32-gcc -o hello -IC:\OpenBLAS-v0.2.14-Win64-int64\includes testeoblas.c
I got this message:
testeoblas.c:1:19: fatal error: cblas.h: No such file or directory
compilation terminated.
I am using the TDM-GCC-64 compiler. This is probably very elementary, but I have no experience with linking libraries. What am I doing wrong?