在QML中使用WebView,運行過程中單擊沒有效果,並提示以下錯誤,
QSslSocket: cannot call unresolved function SSLv23_client_method
QSslSocket: cannot call unresolved function SSL_CTX_new
QSslSocket: cannot call unresolved function SSL_library_init
QSslSocket: cannot call unresolved function ERR_get_error
經查閱,在http://codeblog.vurdalakov.net/2009/11/solution-qsslsocket-cannot-call.html
這裡面看到瞭解決辦法,經過測試解決問題了。
步驟如下:
You need to install OpenSSL Win32 or Win64 binaries.
你需要安裝OpenSSL庫;
1、Open Win32 OpenSSL Installation Project page.
首先開啟OpenSSL Installation Project網頁;
2、Download the latest "light" Win32 or Win64 installation package, for example "Win32 OpenSSL v0.9.8l Light".
下載安裝包,我下載的是:Win32 OpenSSL v1.0.1c Light安裝包,隨著時間的推進,這個版本會不斷更新的。。
3、Install it to any location. Ignore "Microsoft Visual C++ 2008 Redistributables" warning (click OK) and select copying OpenSSL DLLs to "The OpenSSL binaries (\bin) directory".
安裝(exe檔案)到本地,我是安裝到C盤下,並且在安裝過程中選擇將庫安裝到OpenSSL的安裝目錄(/bin)下面。
4、Copy libeay32.dll and ssleay32.dll from the \bin folder to the same place where your QtNetwork4.dll or QtNetworkd4.dll is located.
將libeay32.dll 和 ssleay32.DLL 檔案拷貝到QtSDK中的存放有QtNetwork4.dll和QtNetworkd4.dll的檔案目錄下。我的是
C:\QtSDK\Desktop\Qt\4.8.0\mingw\bin,這個主要是看自己選擇的編譯器也有可能是C:\QtSDK\Desktop\Qt\4.8.0\msvc2010\bin等等。
經過上述4步驟就解決問題了。不錯,謝謝原作者的分享。