QT版本:5.14.0+
平台:Windows Linux
本文章的配置信息并非极小精简。如有用户需要极小精简,请自行增加关闭模块
Windows平台:
查看features模块:configure --list-features
QT版本:5.14.2
Src版本:qt-everywhere-src-5.14.2(正式版未测试)
源码下载地址:https://download.qt.io/
Mingw版本:mingw73_64
提示:如果你先编译了其他版本再按照下面配置编译会出现错误.
解决:mingw32-make -j12 clean 清理编译再进行
QTLite版本:
configure.bat -static -release -platform win32-g++ -no-opengl -prefix /home/jacklee/Qt5.14.0/5.14.0/mingw73_64-static -opensource -confirm-license -make libs -nomake tools -nomake examples -nomake tests -skip qt3d -skip qtandroidextras -skip qtcanvas3d -skip qtcharts -skip qtconnectivity -skip qtdatavis3d -skip qtdeclarative -skip qtdoc -skip qtgamepad -skip qtgraphicaleffects -skip qtimageformats -skip qtlocation -skip qtmacextras -skip qtmultimedia -skip qtnetworkauth -skip qtpurchasing -skip qtquickcontrols -skip qtquickcontrols2 -skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qtsvg -skip qttools -skip qttranslations -skip qtvirtualkeyboard -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebsockets -skip qtwebview -skip qtwinextras -skip qtx11extras -skip qtxmlpatterns -no-feature-texthtmlparser -no-feature-textodfwriter -no-feature-concurrent -no-feature-effects -no-feature-sharedmemory -no-feature-systemsemaphore -no-feature-im -no-feature-process -no-feature-dom -no-feature-filesystemmodel -no-feature-filesystemwatcher -no-feature-graphicsview -no-feature-graphicseffect -no-feature-sizegrip -no-feature-calendarwidget -no-feature-printpreviewwidget -no-feature-keysequenceedit -no-feature-colordialog -no-feature-filedialog -no-feature-fontdialog -no-feature-printpreviewdialog -no-feature-progressdialog -no-feature-errormessage -no-feature-wizard -no-feature-datawidgetmapper -no-feature-imageformat_bmp -no-feature-imageformat_ppm -no-feature-imageformat_xbm -no-feature-imageformat_png -no-feature-imageformat_jpeg -no-feature-image_heuristic_mask -no-feature-image_text -no-feature-colornames -no-feature-cups -no-feature-freetype -no-feature-translation -no-feature-codecs -no-feature-big_codecs -no-feature-iconv -no-feature-ftp -no-feature-udpsocket -no-feature-networkproxy -no-feature-socks5 -no-feature-networkdiskcache -no-feature-bearermanagement -no-feature-completer -no-feature-fscompleter -no-feature-desktopservices -no-feature-mimetype -no-feature-systemtrayicon -no-feature-undocommand -no-feature-undostack -no-feature-undogroup -no-feature-undoview -no-feature-statemachine -no-feature-gestures -no-feature-dbus -no-sql-sqlite -no-sql-odbc -no-vulkan -no-feature-testlib -no-feature-network -no-harfbuzz -no-feature-sql
Linux平台(深度Linux V20):
QTLite Linux静态编译(不得使用qt-everywhere-src源码编译,缺少XCB库):经过再三确认,Linux必须装两次才能编译出XCB不缺少的提示。第一次编译不管如何设置都会提示XCB缺少不知为何
./configure -static -release -opensource -confirm-license -prefix /home/jacklee/Qt5.14.0/5.14.0/mingw73_64-static -make libs -nomake tools -nomake examples -nomake tests -skip qt3d -skip qtandroidextras -skip qtcanvas3d -skip qtcharts -skip qtconnectivity -skip qtdatavis3d -skip qtdeclarative -skip qtdoc -skip qtgamepad -skip qtgraphicaleffects -skip qtimageformats -skip qtlocation -skip qtmacextras -skip qtmultimedia -skip qtnetworkauth -skip qtpurchasing -skip qtquickcontrols -skip qtquickcontrols2 -skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qtsvg -skip qttools -skip qttranslations -skip qtvirtualkeyboard -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebsockets -skip qtwebview -skip qtwinextras -skip qtx11extras -skip qtxmlpatterns -qt-libpng -qt-libjpeg -no-opengl -qt-xcb -no-sql-sqlite -no-feature-testlib -no-feature-network -no-feature-sql
如果却下一些依赖库,请自行使用下面命令安装
sudo apt install libfontconfig1-dev libfreetype6-dev libx11-dev libxext-dev libxfixes-dev libxi-dev libxrender-dev libxcb1-dev libx11-xcb-dev libxcb-glx0-dev libxkbcommon-x11-dev
vek编译配置:
./configure -static -release -opensource -confirm-license -prefix /home/jacklee/Qt5.14.2/5.14.2/mingw73_64-static -make libs -nomake tools -nomake examples -nomake tests -skip qt3d -skip qtandroidextras -skip qtcanvas3d -skip qtcharts -skip qtconnectivity -skip qtdatavis3d -skip qtdeclarative -skip qtdoc -skip qtgamepad -skip qtgraphicaleffects -skip qtimageformats -skip qtlocation -skip qtmacextras -skip qtmultimedia -skip qtnetworkauth -skip qtpurchasing -skip qtquickcontrols -skip qtquickcontrols2 -skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qtsvg -skip qttools -skip qttranslations -skip qtvirtualkeyboard -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebsockets -skip qtwebview -skip qtwinextras -skip qtx11extras -skip qtxmlpatterns -qt-libpng -qt-libjpeg -no-opengl -no-sql-sqlite -no-feature-testlib -no-feature-network -no-feature-sql -qt-pcre -qt-zlib -icu -qt-xcb -no-accessibility -no-icu -no-feature-testlib_selfcover -no-feature-sqlmodel -no-linuxfb -no-evdev -no-glib -no-feature-xml -no-feature-mimetype -no-xcb-xinput -no-vulkan -no-pcre -qt-xcb -no-xcb-xlib
./configure -static -release -opensource -confirm-license -prefix /home/jacklee/Qt5.14.2/5.14.2/mingw73_64-static -make libs -nomake tools -nomake examples -nomake tests -skip qt3d -skip qtandroidextras -skip qtcanvas3d -skip qtcharts -skip qtconnectivity -skip qtdatavis3d -skip qtdeclarative -skip qtdoc -skip qtgamepad -skip qtgraphicaleffects -skip qtimageformats -skip qtlocation -skip qtmacextras -skip qtmultimedia -skip qtnetworkauth -skip qtpurchasing -skip qtquickcontrols -skip qtquickcontrols2 -skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qtsvg -skip qttools -skip qttranslations -skip qtvirtualkeyboard -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebsockets -skip qtwebview -skip qtwinextras -skip qtx11extras -skip qtxmlpatterns -qt-libpng -qt-libjpeg -no-opengl -no-sql-sqlite -no-feature-testlib -no-feature-network -no-feature-sql -qt-pcre -qt-zlib -icu -qt-xcb -no-accessibility -no-icu -no-feature-testlib_selfcover -no-feature-sqlmodel -no-linuxfb -no-evdev -no-glib -no-feature-xml -no-feature-mimetype -no-xcb-xinput -no-feature-network -no-vulkan -no-pcre -qt-xcb -no-feature-xcb-xlib -no-libproxy -no-xcb-xlib -no-sql-mysql -no-sql-psql -no-sql-sqlite -no-journald -no-mtdev -no-gif -no-cups -no-iconv -no-tslib
2020-09-08增加Deepin静态编译配置
./configure -static -release -opensource -confirm-license -optimize-size -strip -pkg-config -prefix /home/jacklee/Qt5.14.2/5.14.2/mingw73_64-static -make libs -gui -widgets -glib -icu -qt-pcre -zlib -qt-harfbuzz -xcb-xlib -qpa xcb -qt-xcb -qt-libpng -qt-libjpeg -nomake tools -nomake examples -nomake tests -skip qt3d -skip qtandroidextras -skip qtcanvas3d -skip qtcharts -skip qtconnectivity -skip qtdatavis3d -skip qtdeclarative -skip qtdoc -skip qtgamepad -skip qtgraphicaleffects -skip qtimageformats -skip qtlocation -skip qtmacextras -skip qtmultimedia -skip qtnetworkauth -skip qtpurchasing -skip qtquickcontrols -skip qtquickcontrols2 -skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qtsvg -skip qttools -skip qttranslations -skip qtvirtualkeyboard -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebsockets -skip qtwebview -skip qtwinextras -skip qtx11extras -skip qtxmlpatterns -no-opengl -no-sql-sqlite -no-feature-testlib -no-feature-network -no-feature-sql