win10sp1升到最新版本;QT5.9.6靜態編譯(network有效)

win10sp1升到最新版本

官方升級工具

QT靜態編譯環境設置

(1)準備

1.迅雷:python-3.5.1 -》安裝到C:\Python35,安裝時勾選添加到路徑

https://www.python.org/ftp/python/3.5.1/python-3.5.1.exe

2.迅雷:ActivePerl-5.22.1.2201 -》安裝到C:\Perl64

http://downloads.activestate.com/ActivePerl/releases/5.22.1.2201/ActivePerl-5.22.1.2201-MSWin32-x64-299574.msi

3.CSDN:openssl-1.0.1c_static_w32_mingw.rar-》解壓到C:\Qt\openssl-1.0.1c_static_w32_mingw

openssl-1.0.1c_static_w32_mingw.rar

4.CSDN:rubyinstaller-2.7.0-1-x64-》安裝到C:\Ruby27-x64

rubyinstaller-2.7.0-1-x64

5.迅雷:Qt5.9.6 qt-opensource-windows-x86-5.9.6.exe-》安裝到C:\Qt\Qt5.9.6

http://download.qt.io/archive/qt/5.9/5.9.6/qt-opensource-windows-x86-5.9.6.exe

6.迅雷:Qt5.9.6 qt-everywhere-opensource-src-5.9.6.zip-》解壓到D:\qt-everywhere-opensource-src-5.9.6

http://download.qt.io/archive/qt/5.9/5.9.6/single/qt-everywhere-opensource-src-5.9.6.zip

 

(2)啓動cmd

(3)檢查

(4)配置相關configure.bat -static -release -platform win32-g++ -prefix "C:\Qt\Qt5.9.6_MinGW_static" -qt-sqlite -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype -opengl desktop -openssl-linked -opensource -confirm-license -make libs OPENSSL_LIBS="-llibssl -llibcrypto -lgdi32" -L C:\Qt\openssl-1.0.1c_static_w32_mingw -I C:\Qt\openssl-1.0.1c_static_w32_mingw\include -nomake tools -nomake examples -nomake tests -skip qt3d -skip qtcanvas3d -skip qtcanvas3d -skip qtdatavis3d -skip qtlocation -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebsockets -skip qtwebview -skip qtwinextras

等大概10分鐘

(5)make

mingw32-make

等大概3小時

(6)make install

mingw32-make install

等大概20分鐘

(7)修改qmake.conf

(8)拷貝一些文件

1.複製動態庫中 C:\Qt\Qt5.9.6\5.9.6\mingw53_32\bin\qmlscene.exe

到靜態庫 C:\Qt\Qt5.9.6_MinGW_static\bin文件夾中。

如果不拷貝則在Qt Creator中添加Qt庫時會報qmlscene未安裝的錯誤。

2.複製動態庫中 C:\Qt\Qt5.9.6\5.9.6\mingw53_32\bin\Qt5Core.dll到靜態鏈接 版的C:\Qt\Qt5.9.6_MinGW_static\lib文件夾中。

如果不執行此步,在Creator的Qt Version中將會顯示“x86-windowsunknown-pe-32bit”。

3.將動態編譯版本 C:\Qt\Qt5.9.6\5.9.6\mingw53_32\qml\QtQuick\Controls中所 有的文件拷貝到

C:\Qt\Qt5.9.6_MinGW_static\qml\QtQuick\Controls

如果有相同的文件則跳過。

(9)QtCreator的一些配置

大功告成

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章