How to link Qt 2.4.1(32) with Intel MKL lib?
-
Just to sum up, you did get it building and running in 32bit and now you've changed the architecture and it doesn't build ?
-
Well, at first I just want to know what is the main approach to linking to libs. You see, I have three folders in lib-folder of MKL: "ia32", "intel64" and "mic". In "mic" I have .a files and .so files, mostly it's the same, but some of .so files don't have corresponding pair. Next, in ia32 there are only .lib files like mkl_core.lib, but strange thing, some of them have corresponfing file, it looks like this: mkl_core.lib and next to it mkl_core_dll.lib.
And at last, in intel64 I have the same thing, names are different from those in ia32 but some og intel64\ files also have a pair mkl_core.lib and mkl_core_dll.lib and so on. And some of files are called like this: mkl_lapack95_ilp64.lib and mkl_lapack95_lp64.lib and so on.
So, what files should I add to LIBS var and how.
Thank you for quick answers!!) -
Then you need to choose the libraries that matches both your architecture and compiler.
Since you already had the 32bit build working reuse the same files but from the intel64 folder.
Also ensure that the compiler used is also the 64bit
-
As far as I can judge I use 32 bit compiler. And I use it in 64 bit Windows and that's the problem? I'll be grateful if you could tell me how to switch to appropriate compiler (considering I'm a newby)).
-
Oh, and I've never got anything compiled with mkl. My first post was a little desperate and erroneous). One time it was built but did not ran because of mkl_thread.dll not being found on my computer. Programm emitted that error message, but the point is that there is no such dll. There is only mkl_thread_dll.lib and I was't sure I understood this error clearly. And anyway I don't remember what link lines I used that time so that's not what I really want to know. I just want to understand (if possible) what's the conventional and understandable way of arranging libraries and linking to them afterwards, and how to apply such a useful knowledge to this case.
-
And referring to last but one post, I think I'll manage switching to msvc compiler 64 bit. And assuming I'll do it, what will be next?
-
And do I get it right that to switch to another compiler in Qt Creator I should have it all recompiled with this compiler?
-
OK, now I've downloaded Qt 5.1.1 msvc2012_64_opengl, and managed to accomplish configuring a kit with MSVC 2012 compiler and Qt 5.1.1 profile. But I have a problem with nmake. I've pointed it to Qt Creator when configuring compiler settings (because neither detected compiler nor detected kit didn't work). And every attempt ends up with make errors. It can't find iostream:
fatal error C1083: ЌҐ г¤ Ґвбп ®вЄалвм д ©« ўЄ«о票Ґ: iostream: No such file or directory
I don't know what to do with its encoding but that's not the main trouble -
Are you sure you've got MSVC 2012 installed properly ?
-
Well, I've just downloaded VS express 2013 for Desktop. Of course I'm not sure, but today I downloaded jom and the same occured. I think problem is with cl.exe but I don't know how to configure it. And by the way, I'm not sure it's 64bit. My kit and compiler settings:
!https://gpieeq.dm2302.livefilestore.com/y2paD5XV7xVmiuVcMqwrBjNSrycBgdsi4gaa9QNUxe9XlDQq4K6OJDu9jEcfGIXQ7c_IjEv_RwFLbtGYr78qFiFYypkxH7wmVvQofbi6_zdMGg/compiler_settings.png?psid=1()!
https://gpieeq.dm1.livefilestore.com/y2p_pb35ffVEQLNjx2eNT7Ll7SL8mIJF1MNFKPj91U_i_DuvjdLG1usZDFGTv3EwSDcwXuEoanBh2wnV1o2SC_-NbHo0kHAbJNplY72Ql6VvmQ/kit_settings.png?psid=1 -
If russian interface confuses you please ask for translation
-
I've just tried to compile main.cpp with cl.exe with options that adds Qt Creator.
-
I've just tried to compile main.cpp with cl.exe with options that adds Qt Creator.
main.cpp:
@#include <iostream>
using namespace std;int main()
{
int a;
cout << "Hello wr!\n";
return 0;
}
@options:
cl -c -nologo -Zm200 -Zc:wchar_t -Zi -MDd -GR -W3 -w34100 -w34189 -EHsc -DUNICODE -DWIN32 -DQT_QML_DEBUG -DQT_DECLARATIVE_DEBUG -I"..........\Qt\Qt5.1.1\5.1.1\msvc2012_64_opengl\mkspecs\win32-msvc2012"
And it works just fine and produces obj file, the problem is aparrently with LINK. Because if I erase -c option (to get cl invoke linker after compiling) LINK emits error message, he can't open msvcprtd.lib -
OK, now I can compile such an example with the same compile command line and with following link command line:
"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\link.exe"
main.obj
/LIBPATH:"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\lib"
/LIBPATH:"C:\Program Files (x86)\Windows Kits\8.1\Lib\winv6.3\um\x86"
And that's it. But I don't know what to do with nmake or jom, how do I change their compile and link lines, to make them behave like the above example? Any help would be appreciated. -
If you have installed VS it should be detected by Qt Creator so you should be able to do everything from it.