-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
Description
Hi, I am trying to run matrix operations in C, I am coding on VScode, when I compile, it gives this message:
>> gcc testtest.c -I "C:\\Users\\experiments\\OpenBlasInstall\\include"
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\User\AppData\Local\Temp\ccsrFgiV.o:testtest.c:(.text+0x29a): undefined reference to `cblas_dgemm'
collect2.exe: error: ld returned 1 exit status
I saw an issue describing the same scenario but that is cmake issue.
I am not sure if is it related to the way I install openblas.
What I did to install openblas:
- download WSL(ubuntu) on window.
- on WSL git clone openblas, cd openblas
- make BINARY=64 HOSTCC=gcc CC=x86_64-w64-mingw32-gcc FC=x86_64-w64-mingw32-gfortran CFLAGS='-static-libgcc -static-libstdc++ -static -ggdb' FFLAGS='-static' && mv -f libopenblas.dll.a libopenblas.lib
- make PREFIX=/mnt/c/Users/experiments/OpenBlasInstall install
May I know how to solve this? Thanks!