1 Attachment(s)
Linking OpenBLAS with Qt Creator project
I am using Qt Creator for development. I want to use Armadillo linear algebra library. Therefore I used following code in my pro file:
Code:
INCLUDEPATH += C:\armadillo-7.950.1\include
LIBS += \
-LC:\armadillo-7.950.1\examples\lib_win64 \
-llapack_win64_MT \
-lblas_win64_MT
It was all good and the project compiled and linked properly. Next task was to replace LAPACK and BLAS with OpenBLAS. So the pro file was changed as following:
Code:
INCLUDEPATH += C:\armadillo-7.950.1\include \
C:\OpenBLAS-v0.2.19-Win64-int32\include
LIBS += \
-LC:\OpenBLAS-v0.2.19-Win64-int32\lib \
-llibopenblas
Now I receive the error: LNK1104: cannot open file 'libopenblas.lib'. I have downloaded windows binary of OpenBLAS. The installed folder structure is as given in the image:
Attachment 12513
Please let me know what is going wrong?
Thanks.
Re: Linking OpenBLAS with Qt Creator project
rename llibopenblas.dll.a as lib and download missing files. Works well.
Re: Linking OpenBLAS with Qt Creator project
The developers of OpenBLAS are using a non-standard naming convention for their import library. You should file a bug report against this.
Re: Linking OpenBLAS with Qt Creator project
Re: Linking OpenBLAS with Qt Creator project
Quote:
The developers of OpenBLAS are using a non-standard naming convention for their import library. You should file a bug report against this.
It is quite common to use '*.dll.a' extension for import libraries when building with GCC for Windows (eg. cygwin, MSYS2, mingw-w64, ...). Only the MS compiler uses '*.lib' extension. I suppose developers of the library using GCC and hence prefer GCC convention. So I would not file a bug report.
Not sure about MS compiler, but GCC allows to specify a library just by passing its full path (without '-l'-prefix). This might be useful to avoid the problem.
BTW: You should not hardcode paths like 'C:\OpenBLAS-v0.2.19-Win64-int32\include' and 'C:\OpenBLAS-v0.2.19-Win64-int32\lib'. Try to auto-detect such paths and allow to override defaults.