Solved: Building Qt libraries for VS2012 runtime
I need to build and link the latest (5.0.1) Qt libraries against the VS2012 runtime libraries.
I’m using the non-commercial Qt.
I've downloaded the qt-everywhere-opensource-src-5.0.1 package and now I'm stuck on some problems:
Apparently there is no proper cookbook on how to configure and build for vs2012 compatibility.
The current problem:
@c:\qt5.0.1\qt-everywhere-opensource-src-5.0.1\qtbase\src\network\ssl\qsslsocket_openssl_p.h(66) : fatal error C1083: Cannot open include file: 'openssl/asn1.h': No such file or directory
My configure command line is:
@configure –I C:\OpenSSL-Win32\include –I C:\OpenSSL-Win32 –I C:\OpenSSL-Win32\include\openssl -opensource -openssl-linked -debug-and-release -platform win32-msvc2012 –no-icu -nomake examples -nomake tests
(of course, the path to openssl is correct).
I couldn’t find the include path mentioned in the created Makefile.
Also tried to clean the configuration using ‘nmake confclean’ (suggested by ‘Configure’), but there is no such file ‘confclean’.
I think the build test for openssl fails because you don't provide the path to openssl's lib.
Retry with only -I C:\OpenSSL-Win32\include and add -L C:\OpenSSL-Win32\lib.
Check the output of the configure script to see if openssl support is activated.
Hope it helps
update: overcame the above error and bumped into another:
To really clean the configuration I started from a vanilla copy of the package (my own 'confclean'' if you wish), then configured again using the same commandline.
This time, compilation passed but link failed on SSL:
@LINK : fatal error LNK1104: cannot open file 'ssleay32.lib'@
Tried to add the libraries to the configure command, by adding to the previous command line:
@-l C:\OpenSSL-Win32\lib\ssleay32.lib -l C:\OpenSSL-Win32\lib\libeay32.lib@
.. and got a funny link error:
@LINK : fatal error LNK1104: cannot open file 'ssleay32.lib.lib'@
@-l C:\OpenSSL-Win32\lib\ssleay32 -l C:\OpenSSL-Win32\lib\libeay32@
got the first link error again.
Also tried using the -L switch with no help.
Any ideas? Thanks.
Using a vanilla copy of the package, used the winner command line - removing the explicit -l<ssl library name> and adding -L<SSL lib directory>.
Thanks for watching!
You're welcome !