1. 下载安装qt-sdk-win-opensource-2010.05.exe
2. 设置mingw的编译环境 开始->Qt SDK by Nokia v2010.05 (open source)->Qt Command Prompt
3. 安装Open SSL(http://www.slproweb.com/products/Win32OpenSSL.html)
我下载的是第一个编译好的Win32 OpenSSL v1.0.0d Light 安装到最后没响应了,用任务管理器kill掉,似乎也安装成功了。也可 以考虑使
用源代码编译安装。
否则编译时会出错,当然可以configure使得不安装ssl,不过我们需要的Webkit支持gmail之类的https网站,所以还是装上吧。
4. 增加gcc和的选项
这个一定要加上,否则会出现类似下面的错误。
painting/qdrawhelper.cpp:1814: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
错误的原因是:
When the functions of Qt are called from spotify, the stack frames are not aligned on 128bits. Qt is compiled with the default stack boundary (128 bits), so the compiler mades assumptions which are not correct for spotify.
The option of GCC to change the stack boundary is -mpreferred-stack-boundary. The stack boundary can also be changed because of the option -Os.
By recompiling Qt with -mstackrealign, spotify does not crash anymore. This is because a prologue is aligning the stack for each call. This slow down each calls so this option will not be enabled by default.
解决办法:
打开mkspecs/win32-g++/qmake.conf
修改成这样 QMAKE_CFLAGS = -mstackrealign
5. 配置 configure.exe -debug-and-release -openssl -I C:/openssl/Include -L C:/openssl/Lib
参考http://stackoverflow.com/questions/3516143/qt-ssl-support-missing
6. mingw32-make
7. 出去休息半天等它编译完成
参考资料:
1. http://dev.firnow.com/course/3_program/c++/cppjs/20091215/184831.html
2.http://stackoverflow.com/questions/3516143/qt-ssl-support-missing
本文详细介绍了如何解决Qt SSL支持缺失的问题,包括下载安装qt-sdk-win-opensource-2010.05.exe、设置mingw编译环境、安装OpenSSL以及配置GCC选项以解决Qt与Spotify之间的兼容性问题。通过遵循步骤,读者能够成功安装并配置SSL支持,从而在项目中使用HTTPS功能。
4470

被折叠的 条评论
为什么被折叠?



