OpenMathLib / OpenBLAS

OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version.
http://www.openblas.net
BSD 3-Clause "New" or "Revised" License
6.29k stars 1.49k forks source link

Can not link test_cblas_dgemm.c #3174

Closed ChrisNabold closed 3 years ago

ChrisNabold commented 3 years ago

I have compiled oipenblas using Mingw-64 -> which created the following directories C:/openblas/include, C:/openblas/lib and c:/openblas/share I also compiled Lapack without Build_shared_libs but with Lapacke -> which creted several directories in c:/Lapack/Build c:/Lapack/build/include and c:/lapack/build/lib with liblapack.a liblapacke.a I have a file c:/temp/test_cblas_dgemm.c but when I try to link it I alwas get the error undefined reference to cblas_dgemm Something with my gcc -command Any help is appreciated Thank you

martin-frbg commented 3 years ago

So what command are you using for linking ? Presumably you would need to specify the C:\openblas\lib path to the compiler so that the libopenblas can be found (-Lc:/openblas/lib -lopenblas). (And by the way your build of OpenBLAS will also contain Lapack and Lapacke by default if you have a fortran compiler installed, so there should be no need to build it separately)

ChrisNabold commented 3 years ago

Dear Martin,

Thank you for your help. I did not realize that openblas contaoins lapack.

I tried it and it worked!

Thank you

Best regards

Chris

From: Martin Kroeker @.> Sent: Tuesday, 6 April 2021 17:18 To: xianyi/OpenBLAS @.> Cc: ChrisNabold @.>; Author @.> Subject: Re: [xianyi/OpenBLAS] Can not link test_cblas_dgemm.c (#3174)

So what command are you using for linking ? Presumably you would need to specify the C:\openblas\lib path to the compiler so that the libopenblas can be found (-Lc:/openblas/lib -lopenblas). (And by the way your build of OpenBLAS will also contain Lapack and Lapacke by default if you have a fortran compiler installed, so there should be no need to build it separately)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/xianyi/OpenBLAS/issues/3174#issuecomment-814204566 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AEIE3ZD2QZWJDMKV4B2VWO3THMQYZANCNFSM42OYTUQQ . https://github.com/notifications/beacon/AEIE3ZEUM7OGQ22CV5TEXTTTHMQYZA5CNFSM42OYTUQ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOGCD4NFQ.gif