(SOLVED)Error compiling Qt 4.8.5 with Openssl
When I try to compile Qt with the option "-openssl" I get the error below:
fatal error c1083: cannot open include file: 'openssl/asn.h': No such file or directory
Are my src files corrupted? Or is other thing?
No, but you need to provide openssl on your system for Qt to use it. Also add the include path and library path when configuring so it can find what it needs.
Hello, very thanks SGalst!
So I installed the Win64 OpenSSL v1.0.1e from "OpenSSL site":http://slproweb.com/products/Win32OpenSSL.html , add the -I and -L options in configure and ran in a vanilla code, like this:
configure.exe -prefix C:/Qt/4.8.5_x64_msvc2008 -debug-and-release -platform win32-msvc2008 -qt-sql-sqlite -no-multimedia -no-audio-backend -no-phonon -no-phonon-backend -no-declarative -mp -nomake examples -nomake demos -nomake docs -openssl -I C:/OpenSSL-Win64/include -L C:/OpenSSL-Win64/lib
After compile the Qt, I tested and it works great!
First I was putting the paths in configure with backslashes ( \ ), like it is in Windows, the configure works, but while compiling, it give me some errors:
"...qmake.cache unescaped backslashes..."
"..qtsqld4.exp qsqldatabase.obj error unresolved external symbol public: static..."
Then I change all the paths with slashes ( / ) and the compiler works!
Even on Windows, Qt works with / rather than \ or if you really need backslashes you would have to use \