在 Windows 10 編譯 Qt 5.15.14 源代碼的詳細過程 步驟詳解


以下編譯過程僅適於 Qt 5.15 及其子版本,經測試可放心使用 (意外情況除外)。

警告:從 Qt 5.15 起,開源用戶需自已編譯 構建二進製安裝包。

硬件要求


係統: Microsoft Windows 10 (64 位完整英文版)

CPU: 1.7 GHz (4 核 8 綫程以上)

內存: 16 GB (1600 MHz 以上)

固態硬盤: 係統分區總大小 75GB 以上

編譯存儲分區剩餘 100GB 以上

Path 環境變量


打開某個文件夾 --> 在窗口左側找到 This PC --> 右鍵上下文菜單 --> Properties

Setting 窗口/右下角 Advanced system settings/System properties/Environment Variables.../System variables/Path 變量 --> 點擊 Edit... 按鈕

獲取源碼


從 Qt 官網或 國內鏡像 下載源代碼。

注意: 從 Qt 官網 git 下載的源代碼可能無法使用,因為經常修改可能不穩定。

以下是從 Qt 官網, git 獲取源代碼的具體步驟 (需要先安裝 Git for Windows 版本管理軟件):

git 獲取源碼 --> cmd --> X: --> cd ./Qt --> git clone git://code.qt.io/Qt/qt5.git --> cd ./qt5 --> git checkout 5.15 --> git submodule update --init --recursive

git 更新源碼 --> cmd --> X: --> cd ./Qt/qt5 --> git remote -v --> git fetch origin --> git log -p 5.15 origin/5.15 --> git merge origin/5.15 --> git submodule update

安裝 Windows SDK


安裝 Windows SDK 10.0.18362 (編譯 qtwebengine 時需要) --> 安裝位置 C:\Program Files (x86)\Windows Kits\10\ --> 默認安裝所有 Features

成功完成後,添加以下一些環境變量:

把 C:\Program Files (x86)\Windows Kits\10\bin\10.0.18362.0\x64\;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\um\x64\;C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\um\; 添加到 path 環境變量

把 C:\Program Files (x86)\Windows Kits\10\bin\;C:\Program Files (x86)\Windows Kits\10\lib\;C:\Program Files (x86)\Windows Kits\10\Include\; 添加到 path 環境變量

把 C:\Program Files (x86)\Windows Kits\10\Redist\D3D\x64\;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\; 添加到 path 環境變量

安裝 Windows DirectX SDK


Windows SDK 10.0.18362 帶有 DirectX 12 (通過 dxdiag 命令查看版本),無需單獨安裝。

安裝 Visual Studio


安裝 Visual Studio Build Tools 2022 for VC 英文版 (非英文版編譯時, 某些字符由於存在兼容性問題可能齣錯)

Workloads 頁/默認勾選 Visual C++ build tools --> Installation details/Optional/勾選適用於最新 v143 生成工具的 C++ ATL ( x86 和 x64) (此功能含 atlbase.h,編譯 qtwebengine 時需要) -->

Installation location 頁/Visual Studio IDE/安裝位置 X:\MSVC\BuildTools 17.0 --> Download Cache/去除勾選 Keep download cache after the installation --> Shared components, tools, and SDKs/安裝位置 X:\MSVC\VisualStudio\Shared -->

開始安裝 --> 成功完成後,添加以下環境變量:

把 X:\MSVC\BuildTools 17.0\VC\Tools\MSVC\14.40.33807\atlmfc\include\; 添加到 path 環境變量

安裝 qmake


安裝 qt-opensource-windows-x86-xx.exe (或帶 qmake 的其它 *.EXE 二進製發行版) --> 安裝時需要填入 Qt 用戶賬號 (沒有賬號需要先申請) -->

安裝位置 X:\Qt\Qt5.x --> 成功完成後,添加以下環境變量:

把 C:\Windows;C:\Windows\System32; 和 X:\Qt\Qt5.x\5.x\msvc201x_64\bin\; 添加到 path 環境變量頭部

查看版本 --> cmd --> qmake -v

安裝 Python 2.7


安裝 Python 2.7.9 或以上版本 (不支持 Python 3.x,編譯 qtwebengine 時需要)

位置 X:\Python27 --> 勾選 Add python.exe to Path 環境變量 --> 把 F:\Python27\;F:\Python27\Scripts\; 添加到 path 環境變量

查看版本 --> cmd --> python -v

安裝 ActivePerl


安裝 ActivePerl 5.22 或以上版本

把 C:\Perl64\bin\;C:\Perl64\lib\; 及 C:\Perl64\site\bin\;C:\Perl64\site\lib\; 添加到 path 環境變量

查看版本 --> cmd --> perl -v

安裝 GnuWin32


到 https://sourceforge.net/projects/getgnuwin32 下載 GetGnuWin32-0.6.3.exe --> 安裝位置 X:\GnuWin32 --> 把 X:\GnuWin32\bin\;X:\GnuWin32\lib\; 添加到 path 環境變量

到 https://sourceforge.net/projects/winflexbison 下載 win_flex_bison3-latest.zip --> 解壓到 X:\win_flex_bison 目錄下 --> 把 X:\win_flex_bison\; 添加到 path 環境變量 --> 若在 qt5.git 之外構建 qtbase,把 win_bison 和 win_flex 重命名為 bison 和 flex

到 https://sourceforge.net/projects/gnuwin32 下載 bison-2.4.1 --> 安裝位置 X:\GnuWin32 --> 安裝 flex-2.5.4a-1 --> 安裝 gperf-3.0.1 --> 安裝 grep-2.5.4 --> 安裝 libiconv-1.9.2-1

編譯 ANGLE QtWebEngine 時需要 Bison、Flex、GPerf

若以上 GnuWin32 鏈接無法下載,請轉至 國內鏡像

安裝 Win64OpenSSL


安裝 Win64OpenSSL 1.1.0 或以上版本

注意:OpenSSL 版本不通過低也不能過高,否則無法使用。

位置 X:\OpenSSL-Win64 --> 勾選 Copy OpenSSL DLLs to: The OpenSSL binaries (/bin) directory

把 X:\OpenSSL-Win64\bin\;X:\OpenSSL-Win64\lib\; 添加到 path 環境變量

安裝 ICU4C


下載 icu4c-68_2-Win64-MSVC2019.zip --> 解壓 icu4c-68_2-Win64-MSVC2019.zip 到 X:\icu4c

把 X:\icu4c\bin64\;X:\icu4c\lib64\; 添加到 path 環境變量

安裝 libclang


下載 libclang-release_110-based-windows-vs2019_64.7z --> 解壓 libclang-release_110-based-windows-vs2019_64.7z 到 X:\libclang

把 X:\libclang\bin\;X:\libclang\lib\; 添加到 path 環境變量

查看版本 --> cmd --> clang -v

比對源碼


解壓 qt-everywhere-src-5.15.2.zip 到 X:\Qt\qt-everywhere-src-5.15.2 目錄下 (注意:此硬盤分區 100GB 以上)

使用 數據比較 工具,比對備份 qt-everywhere-src-5.15.2 源碼 (查看源碼是否差異太大,是否存在問題)

安裝 jom


下載並安裝 jom_1_1_3.zip (jom 編譯效率更高相比 nmake)

解壓到 X:\jom 目錄下 --> 把 X:\jom\; 添加到 path 環境變量

編譯 Qt5.15


調用 x64 Native Tools Command Prompt for VS 2017 (如有更新環境變量,需重啓此窗口) --> X: --> cd ./Qt/qt-everywhere-src-5.15.2

共享版 --> configure -opensource -confirm-license -verbose -platform win32-msvc2017 -release -mp -icu -qt-pcre -qt-zlib -openssl -opengl dynamic -qt-freetype -qt-harfbuzz -qt-libpng -qt-libjpeg -no-sql-mysql -qt-sqlite -qt-tiff -qt-webp -webengine-proprietary-codecs -nomake tests -nomake examples -prefix "X:\Qt\Qt5.15.2_custom\5.15.2\msvc2017_64" -skip qtdoc -skip qtquickcontrols -skip qtscript -skip qtxmlpatterns -I X:\icu4c\include -L X:\icu4c\lib64 -I X:\OpenSSL-Win64\include -L X:\OpenSSL-Win64\lib

靜態版 --> configure -opensource -confirm-license -verbose -platform win32-msvc2017 -release -mp -icu -qt-pcre -qt-zlib -openssl -opengl dynamic -qt-freetype -qt-harfbuzz -qt-libpng -qt-libjpeg -no-sql-mysql -qt-sqlite -qt-tiff -qt-webp -webengine-proprietary-codecs -nomake tests -nomake examples -prefix "X:\Qt\Qt5.15.2_custom\5.15.2\msvc2017_64" -static -skip qtdoc -skip qtquickcontrols -skip qtscript -skip qtxmlpatterns -I X:\icu4c\include -L X:\icu4c\lib64 -I X:\OpenSSL-Win64\include -L X:\OpenSSL-Win64\lib

簡化版 --> configure -opensource -confirm-license -verbose -platform win32-msvc2017 -release -mp -icu -qt-pcre -qt-zlib -openssl -opengl dynamic -qt-freetype -qt-harfbuzz -qt-libpng -qt-libjpeg -no-sql-mysql -qt-sqlite -qt-tiff -qt-webp -webengine-proprietary-codecs -nomake tests -nomake examples -prefix "X:\Qt\Qt5.15.2_custom\5.15.2\msvc2017_64" -skip qt3d -skip qtandroidextras -skip qtcharts -skip qtdatavis3d -skip qtdoc -skip qtgamepad -skip qtgraphicaleffects -skip qtlocation -skip qtlottie -skip qtmacextras -skip qtmultimedia -skip qtnetworkauth -skip qtpurchasing -skip qtquickcontrols -skip qtquickcontrols2 -skip qtremoteobjects -skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qtwayland -skip qtx11extras -skip qtxmlpatterns -I X:\icu4c\include -L X:\icu4c\lib64 -I X:\OpenSSL-Win64\include -L X:\OpenSSL-Win64\lib

編譯並將結果拷貝到 X:\Qt\Qt5.15.2_custom 目錄下

jom --> jom install 或 nmake --> nmake install

編譯 QtWebEngine


Qt WebEngine 隻能在帶有 x64 位工具鏈的 64 位 Windows 中進行構建。

若想構建用於 x86 應用程序的 Qt WebEngine,需要采用 Visual Studio 2017 x64 to x86 交叉編譯工具鏈來配置和編譯 Qt。 可通過運行 vcvarsall.bat amd64_x86,在命令行中設置此工具鏈。

注意事項


相關工具或軟件,請跳轉 下載中心

若仍不會編譯,可聯係 客服 尋求幫助 (或關注樂數軟件相關在綫資源)。

configure 選項


Qt 5.15.2 在 CMD 窗口,configure -h 輸齣信息。

X:/Qt/qt-everywhere-src-5.15.2>configure -h
+ cd qtbase
+ D:\Qt\qt-everywhere-src-5.15.2\qtbase\configure.bat -top-level -h
Usage:  configure [options] [assignments]
 
Configure understands variable assignments like VAR=value on the command line.
Each uppercased library name (obtainable with -list-libraries) supports the
suffixes _INCDIR, _LIBDIR, _PREFIX (INCDIR=PREFIX/include, LIBDIR=PREFIX/lib),
_LIBS, and - on Windows and Darwin - _LIBS_DEBUG and _LIBS_RELEASE. E.g.,
ICU_PREFIX=/opt/icu42 ICU_LIBS="-licui18n -licuuc -licudata".
 
It is also possible to manipulate any QMAKE_* variable, to amend the values
from the mkspec for the build of Qt itself, e.g., QMAKE_CXXFLAGS+=-g3.
 
Note that the *_LIBS* and QMAKE_* assignments manipulate lists, so items
containing meta characters (spaces in particular) need to be quoted according
to qmake rules. On top of that, the assignments as a whole need to be quoted
according to shell rules. It is recommended to use single quotes for the inner
quoting and double quotes for the outer quoting.
 
Top-level installation directories:
  -prefix <dir> ...... The deployment directory, as seen on the target device.
                       [/usr/local/Qt-$QT_VERSION; qtbase build directory if
                       -developer-build]
  -extprefix <dir> ... The installation directory, as seen on the host machine.
                       [SYSROOT/PREFIX]
  -hostprefix [dir] .. The installation directory for build tools running on
                       the host machine. If [dir] is not given, the current
                       build directory will be used. [EXTPREFIX]
  -external-hostbindir <path> ... Path to Qt tools built for this machine.
                       Use this when -platform does not match the current
                       system, i.e., to make a Canadian Cross Build.
Fine tuning of installation directory layout. Note that all directories
except -sysconfdir should be located under -prefix/-hostprefix:
  -bindir <dir> ......... Executables [PREFIX/bin]
  -headerdir <dir> ...... Header files [PREFIX/include]
  -libdir <dir> ......... Libraries [PREFIX/lib]
  -archdatadir <dir> .... Arch-dependent data [PREFIX]
  -plugindir <dir> ...... Plugins [ARCHDATADIR/plugins]
  -libexecdir <dir> ..... Helper programs [ARCHDATADIR/bin on Windows,
                          ARCHDATADIR/libexec otherwise]
  -importdir <dir> ...... QML1 imports [ARCHDATADIR/imports]
  -qmldir <dir> ......... QML2 imports [ARCHDATADIR/qml]
  -datadir <dir> ........ Arch-independent data [PREFIX]
  -docdir <dir> ......... Documentation [DATADIR/doc]
  -translationdir <dir> . Translations [DATADIR/translations]
  -sysconfdir <dir> ..... Settings used by Qt programs [PREFIX/etc/xdg]
  -examplesdir <dir> .... Examples [PREFIX/examples]
  -testsdir <dir> ....... Tests [PREFIX/tests]
  -hostbindir <dir> ..... Host executables [HOSTPREFIX/bin]
  -hostlibdir <dir> ..... Host libraries [HOSTPREFIX/lib]
  -hostdatadir <dir> .... Data used by qmake [HOSTPREFIX]
Conventions for the remaining options: When an option's description is
followed by a list of values in brackets, the interpretation is as follows:
'yes' represents the bare option; all other values are possible prefixes to
the option, e.g., -no-gui. Alternatively, the value can be assigned, e.g.,
--gui=yes. Values are listed in the order they are tried if not specified;
'auto' is a shorthand for 'yes/no'. Solitary 'yes' and 'no' represent binary
options without auto-detection.
Configure meta:
  -help, -h ............ Display this help screen
  -verbose, -v ......... Print verbose messages during configuration
  -continue ............ Continue configure despite errors
  -redo ................ Re-configure with previously used options.
                         Additional options may be passed, but will not be
                         saved for later use by -redo.
  -recheck [test,...] .. Discard cached negative configure test results.
                         Use this after installing missing dependencies.
                         Alternatively, if tests are specified, only their
                         results are discarded.
  -recheck-all ......... Discard all cached configure test results.
  -feature-<feature> ... Enable <feature>
  -no-feature-<feature>  Disable <feature> [none]
  -list-features ....... List available features. Note that some features
                         have dedicated command line options as well.
  -list-libraries ...... List possible external dependencies.
Build options:
  -opensource .......... Build the Open-Source Edition of Qt
  -commercial .......... Build the Commercial Edition of Qt
  -confirm-license ..... Automatically acknowledge the license
  -release ............. Build Qt with debugging turned off [yes]
  -debug ............... Build Qt with debugging turned on [no]
  -debug-and-release ... Build two versions of Qt, with and without
                         debugging turned on [yes] (Apple and Windows only)
  -optimize-debug ...... Enable debug-friendly optimizations in debug builds
                         [auto] (Not supported with MSVC or Clang toolchains)
  -optimize-size ....... Optimize release builds for size instead of speed [no]
  -optimized-tools ..... Build optimized host tools even in debug build [no]
  -force-debug-info .... Create symbol files for release builds [no]
  -separate-debug-info . Split off debug information to separate files [no]
  -gdb-index ........... Index the debug info to speed up GDB
                         [no; auto if -developer-build with debug info]
  -strip ............... Strip release binaries of unneeded symbols [yes]
  -gc-binaries ......... Place each function or data item into its own section
                         and enable linker garbage collection of unused
                         sections. [auto for static builds, otherwise no]
  -force-asserts ....... Enable Q_ASSERT even in release builds [no]
  -developer-build ..... Compile and link Qt for developing Qt itself
                         (exports for auto-tests, extra checks, etc.) [no]
  -shared .............. Build shared Qt libraries [yes] (no for UIKit)
  -static .............. Build static Qt libraries [no] (yes for UIKit)
  -framework ........... Build Qt framework bundles [yes] (Apple only)
  -platform <target> ... Select host mkspec [detected]
  -xplatform <target> .. Select target mkspec when cross-compiling [PLATFORM]
  -device <name> ....... Cross-compile for device <name>
  -device-option <key=value> ... Add option for the device mkspec
  -appstore-compliant .. Disable code that is not allowed in platform app stores.
                         This is on by default for platforms which require distribution
                         through an app store by default, in particular Android,
                         iOS, tvOS, watchOS, and Universal Windows Platform. [auto]
  -qtnamespace <name> .. Wrap all Qt library code in 'namespace <name> {...}'.
  -qtlibinfix <infix> .. Rename all libQt5*.so to libQt5*<infix>.so.
  -qtlibinfix-plugins .. Rename Qt plugins according to -qtlibinfix [no]
  -testcocoon .......... Instrument with the TestCocoon code coverage tool [no]
  -gcov ................ Instrument with the GCov code coverage tool [no]
  -trace [backend] ..... Enable instrumentation with tracepoints.
                         Currently supported backends are 'etw' (Windows) and
                         'lttng' (Linux), or 'yes' for auto-detection. [no]
  -sanitize {address|thread|memory|fuzzer-no-link|undefined}
                         Instrument with the specified compiler sanitizer.
                         Note that some sanitizers cannot be combined;
                         for example, -sanitize address cannot be combined with
                         -sanitize thread.
  -coverage {trace-pc-guard|source-based}
                         Specify the 'trace-pc-guard' coverage instrumentation for
                         sanitizers or generate instrumented code to collect execution
                         counts and enable code coverage analysis, respectively. (Clang only)
  -c++std <edition> .... Select C++ standard <edition> [c++2a/c++17/c++14/c++11]
                         (Not supported with MSVC 2015)
  -sse2 ................ Use SSE2 instructions [auto]
  -sse3/-ssse3/-sse4.1/-sse4.2/-avx/-avx2/-avx512
                         Enable use of particular x86 instructions [auto]
                         Enabled ones are still subject to runtime detection.
  -mips_dsp/-mips_dspr2  Use MIPS DSP/rev2 instructions [auto]
  -qreal <type> ........ typedef qreal to the specified type. [double]
                         Note: this affects binary compatibility.
  -R <string> .......... Add an explicit runtime library path to the Qt
                         libraries. Supports paths relative to LIBDIR.
  -rpath ............... Link Qt libraries and executables using the library
                         install path as a runtime library path. Similar to
                         -R LIBDIR. On Apple platforms, disabling this implies
                         using absolute install names (based in LIBDIR) for
                         dynamic libraries and frameworks. [auto]
  -reduce-exports ...... Reduce amount of exported symbols [auto]
  -reduce-relocations .. Reduce amount of relocations [auto] (Unix only)
  -plugin-manifests .... Embed manifests into plugins [no] (Windows only)
  -static-runtime ...... With -static, use static runtime [no] (Windows only)
  -pch ................. Use precompiled headers [auto]
  -ltcg ................ Use Link Time Code Generation [no]
  -linker [bfd,gold,lld] Force use of the GNU ld, GNU gold or LLVM/LLD linker
                         instead of default one (GCC only)
  -incredibuild-xge .... Use the IncrediBuild XGE [no] (Windows only)
  -ccache .............. Use the ccache compiler cache [no] (Unix only)
  -make-tool <tool> .... Use <tool> to build qmake [nmake] (Windows only)
  -mp .................. Use multiple processors for compilation (MSVC only)
  -warnings-are-errors . Treat warnings as errors [no; yes if -developer-build]
  -silent .............. Reduce the build output so that warnings and errors
                         can be seen more easily
Build environment:
  -sysroot <dir> ....... Set <dir> as the target sysroot
  -gcc-sysroot ......... With -sysroot, pass --sysroot to the compiler [yes]
  -pkg-config .......... Use pkg-config [auto] (Unix only)
  -D <string> .......... Pass additional preprocessor define
  -I <string> .......... Pass additional include path
  -L <string> .......... Pass additional library path
  -F <string> .......... Pass additional framework path (Apple only)
  -sdk <sdk> ........... Build Qt using Apple provided SDK <sdk>. The argument
                         should be one of the available SDKs as listed by
                         'xcodebuild -showsdks'.
                         Note that the argument applies only to Qt libraries
                         and applications built using the target mkspec - not
                         host tools such as qmake, moc, rcc, etc.
  -android-sdk path .... Set Android SDK root path [$ANDROID_SDK_ROOT]
  -android-ndk path .... Set Android NDK root path [$ANDROID_NDK_ROOT]
  -android-ndk-platform  Set Android platform
  -android-ndk-host .... Set Android NDK host (linux-x86, linux-x86_64, etc.)
                         [$ANDROID_NDK_HOST]
  -android-abis .......  Comma separated Android abis, default is:
                         armeabi-v7a,arm64-v8a,x86,x86_64
  -android-javac-target  Set the javac build target version [7]
  -android-javac-source  Set the javac build source version [7]
  -android-style-assets  Automatically extract style assets from the device at
                         run time. This option makes the Android style behave
                         correctly, but also makes the Android platform plugin
                         incompatible with the LGPL2.1. [yes]
Component selection:
  -skip <repo> ......... Exclude an entire repository from the build.
  -make <part> ......... Add <part> to the list of parts to be built.
                         Specifying this option clears the default list first.
                         [libs and examples, also tools if not cross-building,
                         also tests if -developer-build]
  -nomake <part> ....... Exclude <part> from the list of parts to be built.
  -compile-examples .... When unset, install only the sources of examples
                         [no on WebAssembly, otherwise yes]
  -gui ................. Build the Qt GUI module and dependencies [yes]
  -widgets ............. Build the Qt Widgets module and dependencies [yes]
  -no-dbus ............. Do not build the Qt D-Bus module
                         [default on Android and Windows]
  -dbus-linked ......... Build Qt D-Bus and link to libdbus-1 [auto]
  -dbus-runtime ........ Build Qt D-Bus and dynamically load libdbus-1 [no]
  -accessibility ....... Enable accessibility support [yes]
                         Note: Disabling accessibility is not recommended.
Qt comes with bundled copies of some 3rd party libraries. These are used
by default if auto-detection of the respective system library fails.
Core options:
  -doubleconversion .... Select used double conversion library [system/Qt/no]
                         No implies use of sscanf_l and snprintf_l (imprecise).
  -glib ................ Enable Glib support [no; auto on Unix]
  -eventfd ............. Enable eventfd support
  -inotify ............. Enable inotify support
  -iconv ............... Enable iconv(3) support [posix/sun/gnu/no] (Unix only)
  -icu ................. Enable ICU support [auto]
  -pcre ................ Select used libpcre2 [system/Qt/no]
  -pps ................. Enable PPS support [auto] (QNX only)
  -zlib ................ Select used zlib [system/qt]
  Logging backends:
    -journald .......... Enable journald support [no] (Unix only)
    -syslog ............ Enable syslog support [no] (Unix only)
    -slog2 ............. Enable slog2 support [auto] (QNX only)
Network options:
  -ssl ................. Enable either SSL support method [auto]
  -no-openssl .......... Do not use OpenSSL [default on Apple and WinRT]
  -openssl-linked ...... Use OpenSSL and link to libssl [no]
  -openssl-runtime ..... Use OpenSSL and dynamically load libssl [auto]
  -schannel ............ Use Secure Channel [no] (Windows only)
  -securetransport ..... Use SecureTransport [auto] (Apple only)
  -sctp ................ Enable SCTP support [no]
  -libproxy ............ Enable use of libproxy [no]
  -system-proxies ...... Use system network proxies by default [yes]
Gui, printing, widget options:
  -cups ................ Enable CUPS support [auto] (Unix only)
  -fontconfig .......... Enable Fontconfig support [auto] (Unix only)
  -freetype ............ Select used FreeType [system/Qt/no]
  -harfbuzz ............ Select used HarfBuzz-NG [system/Qt/no]
                         (Not auto-detected on Apple and Windows)
  -gtk ................. Enable GTK platform theme support [auto]
  -lgmon ............... Enable lgmon support [auto] (QNX only)
  -no-opengl ........... Disable OpenGL support
  -opengl <api> ........ Enable OpenGL support. Supported APIs:
                         es2 (default on Windows), desktop (default on Unix),
                         dynamic (Windows only)
  -opengles3 ........... Enable OpenGL ES 3.x support instead of ES 2.x [auto]
  -egl ................. Enable EGL support [auto]
  -angle ............... Use bundled ANGLE to support OpenGL ES 2.0 [auto]
                         (Windows only)
  -combined-angle-lib .. Merge LibEGL and LibGLESv2 into LibANGLE (Windows only)
  -qpa <name> .......... Select default QPA backend(s) (e.g., xcb, cocoa, windows)
                         A prioritized list separated by semi-colons.
  -xcb-xlib............. Enable Xcb-Xlib support [auto]
  Platform backends:
    -direct2d .......... Enable Direct2D support [auto] (Windows only)
    -directfb .......... Enable DirectFB support [no] (Unix only)
    -eglfs ............. Enable EGLFS support [auto; no on Android and Windows]
    -gbm ............... Enable backends for GBM [auto] (Linux only)
    -kms ............... Enable backends for KMS [auto] (Linux only)
    -linuxfb ........... Enable Linux Framebuffer support [auto] (Linux only)
    -xcb ............... Enable X11 support [auto] (Linux only)
  Input backends:
    -libudev............ Enable udev support [auto]
    -evdev ............. Enable evdev support [auto]
    -imf ............... Enable IMF support [auto] (QNX only)
    -libinput .......... Enable libinput support [auto]
    -mtdev ............. Enable mtdev support [auto]
    -tslib ............. Enable tslib support [auto]
    -bundled-xcb-xinput  Use bundled XInput2 support [auto]
    -xkbcommon ......... Enable key mapping support [auto]
  Image formats:
    -gif ............... Enable reading support for GIF [auto]
    -ico ............... Enable support for ICO [yes]
    -libpng ............ Select used libpng [system/Qt/no]
    -libjpeg ........... Select used libjpeg [system/Qt/no]
Database options:
  -sql-<driver> ........ Enable SQL <driver> plugin. Supported drivers:
                         db2 ibase mysql oci odbc psql sqlite2 sqlite tds
                         [all auto]
  -sqlite .............. Select used sqlite3 [system/qt]
Qt3D options:
  -assimp .............. Select used assimp library [system/Qt/no]
  -qt3d-profile-jobs ... Enable jobs profiling [no]
  -qt3d-profile-gl ..... Enable OpenGL profiling [no]
  -qt3d-simd ........... Select level of SIMD support [no/sse2/avx2]
  -qt3d-render ......... Enable the Qt3D Render aspect [yes]
  -qt3d-input .......... Enable the Qt3D Input aspect [yes]
  -qt3d-logic .......... Enable the Qt3D Logic aspect [yes]
  -qt3d-extras ......... Enable the Qt3D Extras aspect [yes]
  -qt3d-animation....... Enable the Qt3D Animation aspect [yes]
Further image format options:
  -jasper .............. Enable JPEG-2000 support using the JasPer library [no]
  -mng ................. Enable MNG support [no]
  -tiff ................ Enable TIFF support [system/Qt/no]
  -webp ................ Enable WEBP support [system/Qt/no]
Multimedia options:
  -pulseaudio .......... Enable PulseAudio support [auto] (Unix only)
  -alsa ................ Enable ALSA support [auto] (Unix only)
  -no-gstreamer ........ Disable support for GStreamer
  -gstreamer [version] . Enable GStreamer support [auto]
                         With no parameter, 1.0 is tried first, then 0.10.
  -evr ................. Enables EVR in DirectShow and WMF [auto]
QtQuick3D options:
  -assimp .............. Select used assimp library [system/Qt/no]
TextToSpeech options:
  -flite ............... Enable Flite support [auto] (Unix only)
  -flite-alsa .......... Enable Flite with ALSA support [auto] (Unix only)
  -speechd ............. Enable speech dispatcher support [auto] (Unix only)
WebEngine options:
  -webengine-alsa ................ Enable ALSA support [auto] (Linux only)
  -webengine-pulseaudio .......... Enable PulseAudio support [auto]
                                   (Linux only)
  -webengine-embedded-build ...... Enable Linux embedded build [auto]
                                   (Linux only)
  -webengine-icu ................. Use system ICU libraries [system/qt]
                                   (Linux only)
  -webengine-ffmpeg .............. Use system FFmpeg libraries [system/qt]
                                   (Linux only)
  -webengine-opus ................ Use system Opus libraries [system/qt]
                                   (Linux only)
  -webengine-webp ................ Use system WebP libraries [system/qt]
                                   (Linux only)
  -webengine-pepper-plugins ...... Enable use of Pepper Flash and Widevine
                                   plugins [auto]
  -webengine-printing-and-pdf .... Enable use of printing and output to PDF
                                   [auto]
  -webengine-proprietary-codecs .. Enable support for proprietary codecs [no]
  -webengine-spellchecker ........ Enable support for spellchecker [yes]
  -webengine-native-spellchecker . Enable support for native spellchecker [no]
                                   (macOS only)
  -webengine-webrtc .............. Enable support for WebRTC [auto]
X:/Qt/qt-everywhere-src-5.15.2>
					

最終配置


以下為共享版 config.summary 文件中的最終配置信息。

若最終配置包含警告或錯誤提示,請移除先前生成的所有配置文件,重新 configure。

Build type: win32-msvc (x86_64, CPU features: sse sse2)
Compiler: msvc 191627030
Configuration: sse2 aesni sse3 ssse3 sse4_1 sse4_2 avx avx2 avx512f avx512bw avx512cd avx512dq avx512er avx512ifma avx512pf avx512vbmi avx512vl compile_examples f16c largefile msvc_mp precompile_header rdrnd rdseed shani x86SimdAlways shared shared release c++11 c++14 c++17 c++1z concurrent dbus no-pkg-config stl
Build options:
  Mode ................................... release
  Optimize release build for size ........ no
  Building shared libraries .............. yes
  Using C standard ....................... C89
  Using C++ standard ..................... C++17
  Relocatable ............................ yes
  Using precompiled headers .............. yes
  Using LTCG ............................. no
  Target compiler supports:
    SSE .................................. SSE2 SSE3 SSSE3 SSE4.1 SSE4.2
    AVX .................................. AVX AVX2
    AVX512 ............................... F ER CD PF DQ BW VL IFMA VBMI
    Other x86 ............................ AES F16C RDRAND SHA
  Build parts ............................ libs tools
  App store compliance ................... no
Qt modules and options:
  Qt Concurrent .......................... yes
  Qt D-Bus ............................... yes
  Qt D-Bus directly linked to libdbus .... no
  Qt Gui ................................. yes
  Qt Network ............................. yes
  Qt Sql ................................. yes
  Qt Testlib ............................. yes
  Qt Widgets ............................. yes
  Qt Xml ................................. yes
Support enabled for:
  Using pkg-config ....................... no
  udev ................................... no
  Using system zlib ...................... no
  Zstandard support ...................... no
Qt Core:
  DoubleConversion ....................... yes
    Using system DoubleConversion ........ no
  GLib ................................... no
  iconv .................................. no
  ICU .................................... yes
  Built-in copy of the MIME database ..... yes
  Tracing backend ........................ <none>
  Logging backends:
    journald ............................. no
    syslog ............................... no
    slog2 ................................ no
  PCRE2 .................................. yes
    Using system PCRE2 ................... no
Qt Network:
  getifaddrs() ........................... no
  IPv6 ifname ............................ no
  libproxy ............................... no
  Schannel ............................... no
  OpenSSL ................................ yes
    Qt directly linked to OpenSSL ........ no
  OpenSSL 1.1 ............................ yes
  DTLS ................................... yes
  OCSP-stapling .......................... yes
  SCTP ................................... no
  Use system proxies ..................... yes
  GSSAPI ................................. no
Qt Gui:
  Accessibility .......................... yes
  FreeType ............................... yes
    Using system FreeType ................ no
  HarfBuzz ............................... yes
    Using system HarfBuzz ................ no
  Fontconfig ............................. no
  Image formats:
    GIF .................................. yes
    ICO .................................. yes
    JPEG ................................. yes
      Using system libjpeg ............... no
    PNG .................................. yes
      Using system libpng ................ no
  Text formats:
    HtmlParser ........................... yes
    CssParser ............................ yes
    OdfWriter ............................ yes
    MarkdownReader ....................... yes
      Using system libmd4c ............... no
    MarkdownWriter ....................... yes
  EGL .................................... yes
  OpenVG ................................. no
  OpenGL:
    ANGLE ................................ yes
    Combined ANGLE Library ............... no
    Desktop OpenGL ....................... no
    Dynamic OpenGL ....................... yes
    OpenGL ES 2.0 ........................ no
    OpenGL ES 3.0 ........................ no
    OpenGL ES 3.1 ........................ no
    OpenGL ES 3.2 ........................ no
  Vulkan ................................. no
  Session Management ..................... yes
Features used by QPA backends:
  evdev .................................. no
  libinput ............................... no
  INTEGRITY HID .......................... no
  mtdev .................................. no
  tslib .................................. no
  xkbcommon .............................. no
  X11 specific:
    XLib ................................. no
    XCB Xlib ............................. no
    EGL on X11 ........................... no
    xkbcommon-x11 ........................ no
QPA backends:
  DirectFB ............................... no
  EGLFS .................................. no
  LinuxFB ................................ no
  VNC .................................... no
  Windows:
    Direct 2D ............................ yes
    DirectWrite .......................... yes
    DirectWrite 2 ........................ yes
Qt Sql:
  SQL item models ........................ yes
Qt Widgets:
  GTK+ ................................... no
  Styles ................................. Fusion Windows WindowsVista
Qt PrintSupport:
  CUPS ................................... no
Qt Sql Drivers:
  DB2 (IBM) .............................. no
  InterBase .............................. no
  MySql .................................. no
  OCI (Oracle) ........................... no
  ODBC ................................... yes
  PostgreSQL ............................. no
  SQLite2 ................................ no
  SQLite ................................. yes
    Using system provided SQLite ......... no
  TDS (Sybase) ........................... no
Qt Testlib:
  Tester for item models ................. yes
Serial Port:
  ntddmodm ............................... yes
Qt SerialBus:
  Socket CAN ............................. no
  Socket CAN FD .......................... no
  SerialPort Support ..................... yes
Further Image Formats:
  JasPer ................................. no
  MNG .................................... no
  TIFF ................................... yes
    Using system libtiff ................. no
  WEBP ................................... yes
    Using system libwebp ................. no
Qt QML:
  QML network support .................... yes
  QML debugging and profiling support .... yes
  QML just-in-time compiler .............. yes
  QML sequence object .................... yes
  QML XML http request ................... yes
  QML Locale ............................. yes
Qt QML Models:
  QML list model ......................... yes
  QML delegate model ..................... yes
Qt Quick:
  Direct3D 12 ............................ yes
  AnimatedImage item ..................... yes
  Canvas item ............................ yes
  Support for Qt Quick Designer .......... yes
  Flipable item .......................... yes
  GridView item .......................... yes
  ListView item .......................... yes
  TableView item ......................... yes
  Path support ........................... yes
  PathView item .......................... yes
  Positioner items ....................... yes
  Repeater item .......................... yes
  ShaderEffect item ...................... yes
  Sprite item ............................ yes
QtQuick3D:
  Assimp ................................. yes
  System Assimp .......................... no
Qt Scxml:
  ECMAScript data model for QtScxml ...... yes
Qt Gamepad:
  SDL2 ................................... no
Qt 3D:
  Assimp ................................. yes
  System Assimp .......................... no
  Output Qt3D GL traces .................. no
  Use SSE2 instructions .................. yes
  Use AVX2 instructions .................. no
  Aspects:
    Render aspect ........................ yes
    Input aspect ......................... yes
    Logic aspect ......................... yes
    Animation aspect ..................... yes
    Extras aspect ........................ yes
Qt 3D Renderers:
  OpenGL Renderer ........................ yes
  RHI Renderer ........................... no
Qt 3D GeometryLoaders:
  Autodesk FBX ........................... no
Qt Wayland Client ........................ no
Qt Wayland Compositor .................... no
Qt Bluetooth:
  BlueZ .................................. no
  BlueZ Low Energy ....................... no
  Linux Crypto API ....................... no
  Native Win32 Bluetooth ................. no
  WinRT Bluetooth API (desktop & UWP) .... yes
  WinRT advanced bluetooth low energy API (desktop & UWP) . yes
Qt Sensors:
  sensorfw ............................... no
Qt Quick Controls 2:
  Styles ................................. Default Fusion Imagine Material Universal
Qt Quick Templates 2:
  Hover support .......................... yes
  Multi-touch support .................... yes
Qt Positioning:
  Gypsy GPS Daemon ....................... no
  WinRT Geolocation API .................. yes
Qt Location:
  Qt.labs.location experimental QML plugin . yes
  Geoservice plugins:
    OpenStreetMap ........................ yes
    HERE ................................. yes
    Esri ................................. yes
    Mapbox ............................... yes
    MapboxGL ............................. no
    Itemsoverlay ......................... yes
Qt Multimedia:
  ALSA ................................... no
  GStreamer 1.0 .......................... no
  GStreamer 0.10 ......................... no
  Video for Linux ........................ no
  OpenAL ................................. no
  PulseAudio ............................. no
  Resource Policy (libresourceqt5) ....... no
  Windows Audio Services ................. yes
  DirectShow ............................. yes
  Windows Media Foundation ............... yes
Qt TextToSpeech:
  Flite .................................. no
  Flite with ALSA ........................ no
  Speech Dispatcher ...................... no
Qt Tools:
  Qt Assistant ........................... yes
  Qt Designer ............................ yes
  Qt Distance Field Generator ............ yes
  kmap2qmap .............................. yes
  Qt Linguist ............................ yes
  Mac Deployment Tool .................... no
  makeqpf ................................ yes
  pixeltool .............................. yes
  qdbus .................................. yes
  qev .................................... yes
  Qt Attributions Scanner ................ yes
  qtdiag ................................. yes
  qtpaths ................................ yes
  qtplugininfo ........................... yes
  Windows deployment tool ................ yes
  WinRT Runner Tool ...................... no
Qt Tools:
  QDoc ................................... yes
Qt WebEngine Build Tools:
  Use System Ninja ....................... no
  Use System Gn .......................... no
  Jumbo Build Merge Limit ................ no
  Developer build ........................ no
  Sanitizer .............................. no
Qt WebEngineCore:
  Embedded build ......................... no
  Full debug information ................. no
  Pepper Plugins ......................... yes
  Printing and PDF ....................... yes
  Proprietary Codecs ..................... yes
  Spellchecker ........................... yes
  Native Spellchecker .................... no
  WebRTC ................................. yes
  PipeWire over GIO ...................... no
  Geolocation ............................ yes
  WebChannel support ..................... yes
  Kerberos Authentication ................ yes
  Extensions ............................. yes
  Node.js ................................ no
Qt WebEngineQml:
  Support Qt WebEngine Qml ............... yes
  UI Delegates ........................... yes
  Test Support ........................... no
Qt WebEngineWidgets:
  Support Qt WebEngine Widgets ........... yes
Qt PDF:
  Support V8 ............................. no
  Support XFA ............................ no
  Support XFA-BMP ........................ no
  Support XFA-GIF ........................ no
  Support XFA-PNG ........................ no
  Support XFA-TIFF ....................... no
Qt PDF Widgets:
  Support Qt PDF Widgets ................. yes
 
Note: No wayland-egl support detected. Cross-toolkit compatibility disabled.
 
WARNING: Building without node.js will disable some features of QtWebEngine DevTools.
					

版權聲明: 本文為獨傢原創稿件,版權歸 樂數軟件 ,未經許可不得轉載。