This is a real beginner question - I've never used Qt on Windows before. I want to use the LAPACK library with Qt. I've placed "LIBS += -llapack" in my .pro file, but how do I get Qt to know where the LAPACK library is located?
I have Vista 64.
This is a real beginner question - I've never used Qt on Windows before. I want to use the LAPACK library with Qt. I've placed "LIBS += -llapack" in my .pro file, but how do I get Qt to know where the LAPACK library is located?
I have Vista 64.
Assuming that the library name is right... You don't have to do anything if the library is in your windows PATH. Otherwise you will have to use -L to tell Qt where it is located
You have to set the DEPENDPATH and the INCLUDEPATH in your .pro.
Thanks. I installed LAPACK for Windows, and have the text below as part of my .pro file. But the compiler still can't find -llapack. What's my mistake?
DEPENDPATH += .
DEPENDPATH += C:\Program Files (x86)\University Of Tennessee\LAPACK 3.1.1\lib\x64
INCLUDEPATH += .
INCLUDEPATH += C:\Program Files (x86)\University Of Tennessee\LAPACK 3.1.1\lib\x64
Try something like this:
INCLUDEPATH += "C:\Program Files (x86)\University Of Tennessee\LAPACK 3.1.1\include
LIBS += -L"C:\Program Files (x86)\University Of Tennessee\LAPACK 3.1.1\lib\x64" -llapack
J-P Nurmi
Thank you very much, that worked.
Is there a way to conditionally include that in the .pro file, so that the same .pro file would work on both Windows (where those includes are necessary) and Linux (where a simple -llapack works)?
Yes, by using scopes. See the qmake manual.
Basically, add this to your .pro file:
Qt Code:
win32 { INCLUDEPATH += "C:\Program Files (x86)\University Of Tennessee\LAPACK 3.1.1\include LIBS += -L"C:\Program Files (x86)\University Of Tennessee\LAPACK 3.1.1\lib\x64" -llapack }To copy to clipboard, switch view to plain text mode
Thanks a lot for the help
Bookmarks