Results 1 to 5 of 5

Thread: Linking OpenBLAS with Qt Creator project

  1. #1
    Join Date
    May 2017
    Posts
    9
    Thanks
    2
    Qt products
    Qt5
    Platforms
    MacOS X Windows

    Default 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:
    Qt Code:
    1. INCLUDEPATH += C:\armadillo-7.950.1\include
    2.  
    3. LIBS += \
    4. -LC:\armadillo-7.950.1\examples\lib_win64 \
    5. -llapack_win64_MT \
    6. -lblas_win64_MT
    To copy to clipboard, switch view to plain text mode 

    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:
    Qt Code:
    1. INCLUDEPATH += C:\armadillo-7.950.1\include \
    2. C:\OpenBLAS-v0.2.19-Win64-int32\include
    3.  
    4. LIBS += \
    5. -LC:\OpenBLAS-v0.2.19-Win64-int32\lib \
    6. -llibopenblas
    To copy to clipboard, switch view to plain text mode 

    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:
    OpenBlas_Installation.JPG

    Please let me know what is going wrong?

    Thanks.

  2. #2
    Join Date
    May 2017
    Posts
    9
    Thanks
    2
    Qt products
    Qt5
    Platforms
    MacOS X Windows

    Default Re: Linking OpenBLAS with Qt Creator project

    rename llibopenblas.dll.a as lib and download missing files. Works well.

  3. #3
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default 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.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

  4. The following user says thank you to d_stranz for this useful post:

    LSantoshKSingh (11th July 2017)

  5. #4
    Join Date
    May 2017
    Posts
    9
    Thanks
    2
    Qt products
    Qt5
    Platforms
    MacOS X Windows

    Default Re: Linking OpenBLAS with Qt Creator project

    Thanks, I will.

  6. #5
    Join Date
    Oct 2012
    Posts
    132
    Thanks
    10
    Thanked 21 Times in 21 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows Android

    Default 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.
    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.

Similar Threads

  1. Replies: 1
    Last Post: 13th September 2014, 14:52
  2. Linking a .a and .dll library to Qt project
    By ehnuh in forum Qt Programming
    Replies: 7
    Last Post: 29th March 2013, 06:49
  3. Linking DLL to Project
    By lynchkp in forum Newbie
    Replies: 4
    Last Post: 29th January 2012, 06:36
  4. Replies: 2
    Last Post: 10th February 2011, 17:03
  5. Error Linking QWT-project
    By effendi in forum Qwt
    Replies: 1
    Last Post: 28th October 2008, 07:54

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.