C++ 静态编译Qt5.13.1,使用MinGW(Windows 10)链接-openssl

C++ 静态编译Qt5.13.1,使用MinGW(Windows 10)链接-openssl,c++,qt,ssl,openssl,qmake,C++,Qt,Ssl,Openssl,Qmake,关于: 你好 Qt论坛建议我创建一个新帖子,因为链接的帖子“很旧” 这本质上是对一些“bug”的确认,确切的问题是什么我不确定,但我可以简单地向您提供我的编译脚本和错误 其目的是针对Qt编译OpenSSL,这将允许我编译一个可以发布的单一一体式二进制应用程序。我能够实现,从而使我回到了重新编译方面 错误编译行重复如下所示: ..\..\..\..\include\QtWindowsUIAutomationSupport\5.13.1/QtWindowsUIAutomationSupport/pr

关于:

你好

Qt论坛建议我创建一个新帖子,因为链接的帖子“很旧”

这本质上是对一些“bug”的确认,确切的问题是什么我不确定,但我可以简单地向您提供我的编译脚本和错误

其目的是针对Qt编译OpenSSL,这将允许我编译一个可以发布的单一一体式二进制应用程序。我能够实现,从而使我回到了重新编译方面

错误编译行重复如下所示:

..\..\..\..\include\QtWindowsUIAutomationSupport\5.13.1/QtWindowsUIAutomationSupport/private/qwindowsuiawrapper_p.h:1:10: fatal error: ../../../../../src/platformsupport/windowsuiautomation/qwindowsuiawrapper_p.h: No such file or directory
 #include "../../../../../src/platformsupport/windowsuiautomation/qwindowsuiawrapper_p.h"
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Build type: win32-g++ (i386, CPU features: <none>)
Compiler: gcc 7.3.0
Configuration: sse2 aesni sse3 ssse3 sse4_1 sse4_2 avx avx2 avx512f avx512bw avx512cd avx512dq avx512er avx512ifma avx512pf avx512vbmi avx512vl compile_examples f16c largefile optimize_debug precompile_header rdrnd shani x86SimdAlways debug_and_release release debug build_all c++11 c++14 c++1z concurrent dbus no-pkg-config release_tools static stl
Build options:
  Mode ................................... debug and release; default link: debug; optimized tools
  Optimize debug build ................... yes
  Optimize release build for size ........ no
  Building shared libraries .............. no
  Using C standard ....................... C11
  Using C++ standard ..................... C++17
  Generating GDB index ................... no
  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
    Intrinsics without -mXXX option ...... yes
  Build parts ............................ libs
  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 .................................... no
  Built-in copy of the MIME database ..... yes
  Tracing backend ........................ <none>
  Logging backends:
    journald ............................. no
    syslog ............................... no
    slog2 ................................ no
  Using system PCRE2 ..................... no
Qt Network:
  getifaddrs() ........................... no
  IPv6 ifname ............................ no
  libproxy ............................... no
  Schannel ............................... no
  OpenSSL ................................ yes
    Qt directly linked to OpenSSL ........ yes
  OpenSSL 1.1 ............................ yes
  DTLS ................................... yes
  OCSP-stapling .......................... yes
  SCTP ................................... no
  Use system proxies ..................... yes
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
  EGL .................................... no
  OpenVG ................................. no
  OpenGL:
    ANGLE ................................ no
    Desktop OpenGL ....................... yes
    Dynamic OpenGL ....................... no
    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
QPA backends:
  DirectFB ............................... no
  EGLFS .................................. no
  LinuxFB ................................ no
  VNC .................................... no
  Mir client ............................. 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
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 tracing JIT support ................ no
  QML sequence object .................... yes
  QML list model ......................... yes
  QML XML http request ................... yes
  QML Locale ............................. yes
  QML delegate model ..................... yes
Qt Quick:
  Direct3D 12 ............................ no
  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
Qt Scxml:
  ECMAScript data model for QtScxml ...... yes
Qt Gamepad:
  SDL2 ................................... no
Qt 3D:
  Assimp ................................. yes
  System Assimp .......................... no
  Output Qt3D Job traces ................. no
  Output Qt3D GL traces .................. no
  Use SSE2 instructions .................. no
  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
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
  WinRT Bluetooth API (desktop & UWP) .... no
  WinRT advanced bluetooth low energy API (desktop & UWP) . no
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 .................. no
Qt Location:
  Qt.labs.location experimental QML plugin . yes
  Geoservice plugins:
    OpenStreetMap ........................ yes
    HERE ................................. yes
    Esri ................................. yes
    Mapbox ............................... yes
    MapboxGL ............................. yes
    Itemsoverlay ......................... yes
QtXmlPatterns:
  XML schema support ..................... 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 ................. no
  DirectShow ............................. yes
  Windows Media Foundation ............... no
Qt Tools:
  QDoc ................................... no
Qt WebEngineCore:
  Qt WebEngine Widgets ................... yes
  Qt WebEngine Qml ....................... yes
  Embedded build ......................... no
  Full debug information ................. no
  Pepper Plugins ......................... yes
  Printing and PDF ....................... yes
  Proprietary Codecs ..................... no
  Spellchecker ........................... yes
  Native Spellchecker .................... no
  WebRTC ................................. yes
  Use System Ninja ....................... no
  Geolocation ............................ yes
  WebChannel support ..................... yes
  Use v8 snapshot ........................ yes
  Kerberos Authentication ................ yes
  Extensions ............................. yes
Qt WebEngineQml:
  UI Delegates ........................... yes
  Test Support ........................... no

Note: Using static linking will disable the use of dynamically
loaded plugins. Make sure to import all needed static plugins,
or compile needed modules into the library.

Note: When linking against OpenSSL, you can override the default
library names through OPENSSL_LIBS.
For example:
    OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' ./configure -openssl-linked

Note: No wayland-egl support detected. Cross-toolkit compatibility disabled.

WARNING: QDoc will not be compiled, probably because libclang could not be located. This means that you cannot build the Qt documentation.
问题:

..\..\..\..\include\QtWindowsUIAutomationSupport\5.13.1/QtWindowsUIAutomationSupport/private/qwindowsuiawrapper_p.h:1:10: fatal error: ../../../../../src/platformsupport/windowsuiautomation/qwindowsuiawrapper_p.h: No such file or directory
 #include "../../../../../src/platformsupport/windowsuiautomation/qwindowsuiawrapper_p.h"
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Build type: win32-g++ (i386, CPU features: <none>)
Compiler: gcc 7.3.0
Configuration: sse2 aesni sse3 ssse3 sse4_1 sse4_2 avx avx2 avx512f avx512bw avx512cd avx512dq avx512er avx512ifma avx512pf avx512vbmi avx512vl compile_examples f16c largefile optimize_debug precompile_header rdrnd shani x86SimdAlways debug_and_release release debug build_all c++11 c++14 c++1z concurrent dbus no-pkg-config release_tools static stl
Build options:
  Mode ................................... debug and release; default link: debug; optimized tools
  Optimize debug build ................... yes
  Optimize release build for size ........ no
  Building shared libraries .............. no
  Using C standard ....................... C11
  Using C++ standard ..................... C++17
  Generating GDB index ................... no
  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
    Intrinsics without -mXXX option ...... yes
  Build parts ............................ libs
  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 .................................... no
  Built-in copy of the MIME database ..... yes
  Tracing backend ........................ <none>
  Logging backends:
    journald ............................. no
    syslog ............................... no
    slog2 ................................ no
  Using system PCRE2 ..................... no
Qt Network:
  getifaddrs() ........................... no
  IPv6 ifname ............................ no
  libproxy ............................... no
  Schannel ............................... no
  OpenSSL ................................ yes
    Qt directly linked to OpenSSL ........ yes
  OpenSSL 1.1 ............................ yes
  DTLS ................................... yes
  OCSP-stapling .......................... yes
  SCTP ................................... no
  Use system proxies ..................... yes
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
  EGL .................................... no
  OpenVG ................................. no
  OpenGL:
    ANGLE ................................ no
    Desktop OpenGL ....................... yes
    Dynamic OpenGL ....................... no
    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
QPA backends:
  DirectFB ............................... no
  EGLFS .................................. no
  LinuxFB ................................ no
  VNC .................................... no
  Mir client ............................. 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
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 tracing JIT support ................ no
  QML sequence object .................... yes
  QML list model ......................... yes
  QML XML http request ................... yes
  QML Locale ............................. yes
  QML delegate model ..................... yes
Qt Quick:
  Direct3D 12 ............................ no
  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
Qt Scxml:
  ECMAScript data model for QtScxml ...... yes
Qt Gamepad:
  SDL2 ................................... no
Qt 3D:
  Assimp ................................. yes
  System Assimp .......................... no
  Output Qt3D Job traces ................. no
  Output Qt3D GL traces .................. no
  Use SSE2 instructions .................. no
  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
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
  WinRT Bluetooth API (desktop & UWP) .... no
  WinRT advanced bluetooth low energy API (desktop & UWP) . no
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 .................. no
Qt Location:
  Qt.labs.location experimental QML plugin . yes
  Geoservice plugins:
    OpenStreetMap ........................ yes
    HERE ................................. yes
    Esri ................................. yes
    Mapbox ............................... yes
    MapboxGL ............................. yes
    Itemsoverlay ......................... yes
QtXmlPatterns:
  XML schema support ..................... 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 ................. no
  DirectShow ............................. yes
  Windows Media Foundation ............... no
Qt Tools:
  QDoc ................................... no
Qt WebEngineCore:
  Qt WebEngine Widgets ................... yes
  Qt WebEngine Qml ....................... yes
  Embedded build ......................... no
  Full debug information ................. no
  Pepper Plugins ......................... yes
  Printing and PDF ....................... yes
  Proprietary Codecs ..................... no
  Spellchecker ........................... yes
  Native Spellchecker .................... no
  WebRTC ................................. yes
  Use System Ninja ....................... no
  Geolocation ............................ yes
  WebChannel support ..................... yes
  Use v8 snapshot ........................ yes
  Kerberos Authentication ................ yes
  Extensions ............................. yes
Qt WebEngineQml:
  UI Delegates ........................... yes
  Test Support ........................... no

Note: Using static linking will disable the use of dynamically
loaded plugins. Make sure to import all needed static plugins,
or compile needed modules into the library.

Note: When linking against OpenSSL, you can override the default
library names through OPENSSL_LIBS.
For example:
    OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' ./configure -openssl-linked

Note: No wayland-egl support detected. Cross-toolkit compatibility disabled.

WARNING: QDoc will not be compiled, probably because libclang could not be located. This means that you cannot build the Qt documentation.
如何使用
-OpenSSL-linked
配置标志静态编译带有OpenSSL的Qt


以下更多详细信息: 我的安装环境:

  • 使用MinGW32进行编译
    • 使用OpenSSL 1.1.1d预编译可从下载,它有我链接到的MinGW libs,如下文所示
  • PATH
    将OpenSSL
    /bin
    与版本
    OpenSSL 1.1.1d一起添加到2019年9月10日
我用来编译Qt的脚本可以在第页的Qt中找到。对于OpenSSL的添加,我将使用它作为指南

我的编译scirpt配置为:

    $QtSrcUrl = "F:\Qt\Static-OpenSSL-Linked\src\qt-everywhere-src-5.13.1.tar",
    $QtStaticDir = "F:\Qt\Static-OpenSSL-Linked",
    $QtVersion = "",
    $arch = "32",
    $MingwDir = "",
    $threads = "16",
    $OPENSSL_HOME = "C:\OpenSSL\OpenSSL-Win$($arch)",

    set OPENSSL_LIBS="-lssl -lcrypto"
    cmd /c "configure.bat -static -debug-and-release -platform win32-g++ -prefix $QtDir `
        -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype -opengl desktop -sql-sqlite -openssl-linked -I $($OPENSSL_HOME)\include -L$($OPENSSL_HOME)\lib\MinGW `
        -opensource -confirm-license `
        -make libs -nomake tools -nomake examples -nomake tests"
    cmd /c "mingw32-make -k -j$($threads)"
我已经在安装了OpenSSL

PS C:\OpenSSL\OpenSSL-Win32> ls

Directory: C:\OpenSSL\OpenSSL-Win32

Mode                LastWriteTime         Length Name
----                -------------         ------ ----
d-----       2019/09/30     07:27                bin
d-----       2019/09/30     07:27                exp
d-----       2019/09/30     07:27                include
d-----       2019/09/30     07:27                lib
d-----       2019/09/30     07:27                tests
-a----       2019/09/11     18:10             89 acknowledgements.txt
-a----       2019/09/11     18:10            752 authors.txt
-a----       2019/09/11     18:10         596279 changes.txt
-a----       2019/09/11     18:10           6408 c_rehash.pl
-a----       2019/09/11     18:10             86 faq.txt
-a----       2019/09/11     18:10        2515456 libcrypto-1_1.dll
-a----       2019/09/11     18:10         530432 libssl-1_1.dll
-a----       2019/09/11     18:10           6246 license.txt
-a----       2019/09/11     18:10          43136 news.txt
-a----       2019/09/11     18:10           3251 readme.txt
-a----       2019/09/30     07:27          96904 unins000.dat
-a----       2019/09/30     07:26         730789 unins000.exe
我看到一些帖子提到了
%OPENSSL\u HOME%
%OPENSSL\u HOME%\libs
,并将一个env变量设置为

OPENSSL_LIBS="-lssl -lcrypto"
我试过了,但总是抱怨找不到“-lssl”。因此,我选择了下面的目录,它似乎工作正常,并选择了
-lssl-lcrypto
(不确定这是否是编译问题的共犯)

配置摘要:(重要部分)

错误线的其他示例如下所示:

In file included from uiautomation\qwindowsuiabaseprovider.h:50:0,
                 from uiautomation\qwindowsuiabaseprovider.cpp:43:
..\..\..\..\include\QtWindowsUIAutomationSupport\5.13.1/QtWindowsUIAutomationSupport/private/qwindowsuiawrapper_p.h:1:10: fatal error: ../../../../../src/platformsupport/windowsuiautomation/qwindowsuiawrapper_p.h: No such file or directory
 #include "../../../../../src/platformsupport/windowsuiautomation/qwindowsuiawrapper_p.h"
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
mingw32-make[6]: *** [Makefile.Debug:11357: .obj/debug/qwindowsuiabaseprovider.o] Error 1
g++ -c -fno-keep-inline-dllexport -g -Og -std=c++1z -fno-exceptions -Wall -W -Wextra -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow -ffunction-sections -fdata-sections -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DQT_STATIC_BUILD -DWINVER=0x0601 -D_WIN32_WINNT=0x0601 -DQT_NO_CAST_FROM_ASCII -DQT_NO_FOREACH -DLIBEGL_NAME=libEGL -DLIBGLESV2_NAME=libGLESv2 -DQT_DEPRECATED_WARNINGS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_EXCEPTIONS -DQT_STATICPLUGIN -DQT_PLUGIN -DQT_EVENTDISPATCHER_SUPPORT_LIB -DQT_FONTDATABASE_SUPPORT_LIB -DQT_THEME_SUPPORT_LIB -DQT_ACCESSIBILITY_SUPPORT_LIB -DQT_WINDOWSUIAUTOMATION_SUPPORT_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_PLUGIN_RESOURCE_INIT_FUNCTION=qwindowsd_plugin_resource_init -I. -I. -I..\..\..\3rdparty\wintab -I..\..\..\..\include -I..\..\..\..\include\QtEventDispatcherSupport -I..\..\..\..\include\QtEventDispatcherSupport\5.13.1 -I..\..\..\..\include\QtEventDispatcherSupport\5.13.1\QtEventDispatcherSupport -I..\..\..\..\include\QtFontDatabaseSupport -I..\..\..\..\include\QtFontDatabaseSupport\5.13.1 -I..\..\..\..\include\QtFontDatabaseSupport\5.13.1\QtFontDatabaseSupport -I..\..\..\..\include\QtThemeSupport -I..\..\..\..\include\QtThemeSupport\5.13.1 -I..\..\..\..\include\QtThemeSupport\5.13.1\QtThemeSupport -I..\..\..\..\include\QtAccessibilitySupport -I..\..\..\..\include\QtAccessibilitySupport\5.13.1 -I..\..\..\..\include\QtAccessibilitySupport\5.13.1\QtAccessibilitySupport -I..\..\..\..\include\QtWindowsUIAutomationSupport -I..\..\..\..\include\QtWindowsUIAutomationSupport\5.13.1 -I..\..\..\..\include\QtWindowsUIAutomationSupport\5.13.1\QtWindowsUIAutomationSupport -I..\..\..\..\include\QtGui\5.13.1 -I..\..\..\..\include\QtGui\5.13.1\QtGui -I..\..\..\..\include\QtGui -I..\..\..\..\include\QtCore\5.13.1 -I..\..\..\..\include\QtCore\5.13.1\QtCore -I..\..\..\..\include\QtCore -I.moc\debug -IC:\OpenSSL\OpenSSL-Win32\include -I..\..\..\..\mkspecs\win32-g++  -o .obj\debug\qwindowsuiavalueprovider.o uiautomation\qwindowsuiavalueprovider.cpp
还有一个例子

In file included from ..\windows\uiautomation\qwindowsuiabaseprovider.h:50:0,
                 from ..\windows\uiautomation\qwindowsuiagriditemprovider.h:46,
                 from ..\windows\uiautomation\qwindowsuiagriditemprovider.cpp:43:
..\..\..\..\include\QtWindowsUIAutomationSupport\5.13.1/QtWindowsUIAutomationSupport/private/qwindowsuiawrapper_p.h:1:10: fatal error: ../../../../../src/platformsupport/windowsuiautomation/qwindowsuiawrapper_p.h: No such file or directory
 #include "../../../../../src/platformsupport/windowsuiautomation/qwindowsuiawrapper_p.h"
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
mingw32-make[6]: *** [Makefile.Debug:14323: .obj/debug/qwindowsuiagriditemprovider.o] Error 1
g++ -c -fno-keep-inline-dllexport -g -Og -std=c++1z -fno-exceptions -Wall -W -Wextra -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow -ffunction-sections -fdata-sections -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DQT_STATIC_BUILD -DWINVER=0x0601 -D_WIN32_WINNT=0x0601 -DQT_NO_CAST_FROM_ASCII -DQT_NO_FOREACH -DLIBEGL_NAME=libEGL -DLIBGLESV2_NAME=libGLESv2 -DQT_DEPRECATED_WARNINGS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_EXCEPTIONS -DQT_STATICPLUGIN -DQT_PLUGIN -DQT_EVENTDISPATCHER_SUPPORT_LIB -DQT_FONTDATABASE_SUPPORT_LIB -DQT_THEME_SUPPORT_LIB -DQT_ACCESSIBILITY_SUPPORT_LIB -DQT_WINDOWSUIAUTOMATION_SUPPORT_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_PLUGIN_RESOURCE_INIT_FUNCTION=qdirect2dd_plugin_resource_init -I. -I..\windows -I..\..\..\3rdparty\wintab -I..\..\..\..\include -I..\..\..\..\include\QtEventDispatcherSupport -I..\..\..\..\include\QtEventDispatcherSupport\5.13.1 -I..\..\..\..\include\QtEventDispatcherSupport\5.13.1\QtEventDispatcherSupport -I..\..\..\..\include\QtFontDatabaseSupport -I..\..\..\..\include\QtFontDatabaseSupport\5.13.1 -I..\..\..\..\include\QtFontDatabaseSupport\5.13.1\QtFontDatabaseSupport -I..\..\..\..\include\QtThemeSupport -I..\..\..\..\include\QtThemeSupport\5.13.1 -I..\..\..\..\include\QtThemeSupport\5.13.1\QtThemeSupport -I..\..\..\..\include\QtAccessibilitySupport -I..\..\..\..\include\QtAccessibilitySupport\5.13.1 -I..\..\..\..\include\QtAccessibilitySupport\5.13.1\QtAccessibilitySupport -I..\..\..\..\include\QtWindowsUIAutomationSupport -I..\..\..\..\include\QtWindowsUIAutomationSupport\5.13.1 -I..\..\..\..\include\QtWindowsUIAutomationSupport\5.13.1\QtWindowsUIAutomationSupport -I..\..\..\..\include\QtGui\5.13.1 -I..\..\..\..\include\QtGui\5.13.1\QtGui -I..\..\..\..\include\QtGui -I..\..\..\..\include\QtCore\5.13.1 -I..\..\..\..\include\QtCore\5.13.1\QtCore -I..\..\..\..\include\QtCore -I.moc\debug -IC:\OpenSSL\OpenSSL-Win32\include -I..\..\..\..\mkspecs\win32-g++  -o .obj\debug\qwindowsuiawindowprovider.o ..\windows\uiautomation\qwindowsuiawindowprovider.cpp
在编译完成之前的最后几行,我有以下内容:

F:\Qt\Static-OpenSSL-Linked\src\qt-everywhere-src-5.13.1\qtbase\bin\qmake.exe -install qinstall F:\Qt\Static-OpenSSL-Linked\src\qt-everywhere-src-5.13.1\qtbase\mkspecs\winrt-x86-msvc2017 F:\Qt\Static-OpenSSL-Linked\5.13.1_x32\mkspecs\winrt-x86-msvc2017
F:\Qt\Static-OpenSSL-Linked\src\qt-everywhere-src-5.13.1\qtbase\bin\qmake.exe -install qinstall F:\Qt\Static-OpenSSL-Linked\src\qt-everywhere-src-5.13.1\qtbase\mkspecs\winrt-x86-msvc2019 F:\Qt\Static-OpenSSL-Linked\5.13.1_x32\mkspecs\winrt-x86-msvc2019
mingw32-make[1]: Target 'install' not remade because of errors.
mingw32-make[1]: Leaving directory 'F:/Qt/Static-OpenSSL-Linked/src/qt-everywhere-src-5.13.1/qtbase'
mingw32-make: *** [Makefile:94: module-qtbase-install_subtargets] Error 2
mingw32-make: Target 'install' not remade because of errors.
配置摘要:

..\..\..\..\include\QtWindowsUIAutomationSupport\5.13.1/QtWindowsUIAutomationSupport/private/qwindowsuiawrapper_p.h:1:10: fatal error: ../../../../../src/platformsupport/windowsuiautomation/qwindowsuiawrapper_p.h: No such file or directory
 #include "../../../../../src/platformsupport/windowsuiautomation/qwindowsuiawrapper_p.h"
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Build type: win32-g++ (i386, CPU features: <none>)
Compiler: gcc 7.3.0
Configuration: sse2 aesni sse3 ssse3 sse4_1 sse4_2 avx avx2 avx512f avx512bw avx512cd avx512dq avx512er avx512ifma avx512pf avx512vbmi avx512vl compile_examples f16c largefile optimize_debug precompile_header rdrnd shani x86SimdAlways debug_and_release release debug build_all c++11 c++14 c++1z concurrent dbus no-pkg-config release_tools static stl
Build options:
  Mode ................................... debug and release; default link: debug; optimized tools
  Optimize debug build ................... yes
  Optimize release build for size ........ no
  Building shared libraries .............. no
  Using C standard ....................... C11
  Using C++ standard ..................... C++17
  Generating GDB index ................... no
  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
    Intrinsics without -mXXX option ...... yes
  Build parts ............................ libs
  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 .................................... no
  Built-in copy of the MIME database ..... yes
  Tracing backend ........................ <none>
  Logging backends:
    journald ............................. no
    syslog ............................... no
    slog2 ................................ no
  Using system PCRE2 ..................... no
Qt Network:
  getifaddrs() ........................... no
  IPv6 ifname ............................ no
  libproxy ............................... no
  Schannel ............................... no
  OpenSSL ................................ yes
    Qt directly linked to OpenSSL ........ yes
  OpenSSL 1.1 ............................ yes
  DTLS ................................... yes
  OCSP-stapling .......................... yes
  SCTP ................................... no
  Use system proxies ..................... yes
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
  EGL .................................... no
  OpenVG ................................. no
  OpenGL:
    ANGLE ................................ no
    Desktop OpenGL ....................... yes
    Dynamic OpenGL ....................... no
    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
QPA backends:
  DirectFB ............................... no
  EGLFS .................................. no
  LinuxFB ................................ no
  VNC .................................... no
  Mir client ............................. 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
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 tracing JIT support ................ no
  QML sequence object .................... yes
  QML list model ......................... yes
  QML XML http request ................... yes
  QML Locale ............................. yes
  QML delegate model ..................... yes
Qt Quick:
  Direct3D 12 ............................ no
  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
Qt Scxml:
  ECMAScript data model for QtScxml ...... yes
Qt Gamepad:
  SDL2 ................................... no
Qt 3D:
  Assimp ................................. yes
  System Assimp .......................... no
  Output Qt3D Job traces ................. no
  Output Qt3D GL traces .................. no
  Use SSE2 instructions .................. no
  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
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
  WinRT Bluetooth API (desktop & UWP) .... no
  WinRT advanced bluetooth low energy API (desktop & UWP) . no
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 .................. no
Qt Location:
  Qt.labs.location experimental QML plugin . yes
  Geoservice plugins:
    OpenStreetMap ........................ yes
    HERE ................................. yes
    Esri ................................. yes
    Mapbox ............................... yes
    MapboxGL ............................. yes
    Itemsoverlay ......................... yes
QtXmlPatterns:
  XML schema support ..................... 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 ................. no
  DirectShow ............................. yes
  Windows Media Foundation ............... no
Qt Tools:
  QDoc ................................... no
Qt WebEngineCore:
  Qt WebEngine Widgets ................... yes
  Qt WebEngine Qml ....................... yes
  Embedded build ......................... no
  Full debug information ................. no
  Pepper Plugins ......................... yes
  Printing and PDF ....................... yes
  Proprietary Codecs ..................... no
  Spellchecker ........................... yes
  Native Spellchecker .................... no
  WebRTC ................................. yes
  Use System Ninja ....................... no
  Geolocation ............................ yes
  WebChannel support ..................... yes
  Use v8 snapshot ........................ yes
  Kerberos Authentication ................ yes
  Extensions ............................. yes
Qt WebEngineQml:
  UI Delegates ........................... yes
  Test Support ........................... no

Note: Using static linking will disable the use of dynamically
loaded plugins. Make sure to import all needed static plugins,
or compile needed modules into the library.

Note: When linking against OpenSSL, you can override the default
library names through OPENSSL_LIBS.
For example:
    OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' ./configure -openssl-linked

Note: No wayland-egl support detected. Cross-toolkit compatibility disabled.

WARNING: QDoc will not be compiled, probably because libclang could not be located. This means that you cannot build the Qt documentation.
构建类型:win32-g++(i386,CPU功能:)
编译器:gcc 7.3.0
配置:sse2 aesni sse3 ssse3 sse4_1 sse4_2 avx avx2 avx512f avx512bw avx512cd avx512dq avx512er avx512ifma avx512pf avx512vbmi avx512vl编译示例f16c大文件优化调试预编译头rdrnd shani x86SimdAlways调试和发布调试构建所有c++11 c++14 c++1z并发DBU无pkg配置发布工具静态stl
构建选项:
模式调试和发布;默认链接:调试;优化工具
优化调试构建。。。。。。。。。。。。。。。。。。。对
优化发布版本的大小。。。。。。。。不
建立共享图书馆。。。。。。。。。。。。。。不
使用C标准。。。。。。。。。。。。。。。。。。。。。。。C11
使用C++标准…C++17
生成GDB索引。。。。。。。。。。。。。。。。。。。不
使用预编译头。。。。。。。。。。。。。。对
使用LTCG。。。。。。。。。。。。。。。。。。。。。。。。。。。。。不
目标编译器支持:
上海证券交易所SSE2 SSE3 SSE3 SSE4.1 SSE4.2
AVX。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。AVX AVX2
AVX512。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。F ER CD PF DQ BW VL IFMA VBMI
其他x86。。。。。。。。。。。。。。。。。。。。。。。。。。。。AES F16C RDRAND SHA
不带-mXXX选项的内部函数。。。。。。对
制造零件。。。。。。。。。。。。。。。。。。。。。。。。。。。。自由基
应用商店合规性。。。。。。。。。。。。。。。。。。。不
Qt模块和选项:
Qt并发。。。。。。。。。。。。。。。。。。。。。。。。。。对
Qt D总线。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。对
Qt D-Bus直接链接到libdbus。。。。不
Qt图形用户界面。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。对
Qt网络。。。。。。。。。。。。。。。。。。。。。。。。。。。。。对
Qt Sql。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。对
Qt测试库。。。。。。。。。。。。。。。。。。。。。。。。。。。。。对
Qt小部件。。。。。。。。。。。。。。。。。。。。。。。。。。。。。对
Qt Xml。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。对
支持:
使用pkg配置。。。。。。。。。。。。。。。。。。。。。。。不
udev。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。不
使用系统zlib。。。。。。。。。。。。。。。。。。。。。。不
Z标准支持。。。。。。。。。。。。。。。。。。。。。。不
Qt核心:
双重转换。。。。。。。。。。。。。。。。。。。。。。。对
使用系统双重转换。。。。。。。。不
油嘴滑舌的不
iconv。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。不
重症监护病房。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。不
MIME数据库的内置副本。。。。。对
跟踪后端。。。。。。。。。。。。。。。。。。。。。。。。
日志记录后端:
日志。。。。。。。。。。。。。。。。。。。。。。。。。。。。。不
系统日志。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。不
缓慢2。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。不
使用系统PCRE2。。。。。。。。。。。。。。。。。。。。。不
Qt网络:
getifaddrs()。。。。。。。。。。。。。。。。。。。。。。。。。。。不
IPv6 ifname。。。。。。。。。。。。。。。。。。。。。。。。。。。。不
libproxy。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。不
夏奈尔。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。不
OpenSSL。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。对
Qt直接链接到OpenSSL。。。。。。。。对
OpenSSL 1.1。。。。。。。。。。。。。。。。。。。。。。。。。。。。对
DTLS。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。对
OCSP钉合。。。。。。。。。。。。。。。。。。。。。。。。。。对
SCTP。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。不
使用系统代理。。。。。。。。。。。。。。。。。。。。。对
Qt Gui:
可达性。。。。。。。。。。。。。。。。。。。。。。。。。。对
自由式。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。对
使用系统FreeType。。。。。。。。。。。。。。。。不
哈夫布兹。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。对
使用系统HarfBuzz。。。。。。。。。。。。。。。。不
Fontconfig。。。。。。。。。。。。。。。。。。。。。。。。。。。。。不
图像格式:
GIF。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。对
ICO。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。对
JPEG。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。对
使用系统libjpeg。。。。。。。。。。。。。。。不
巴布亚新几内亚。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。对
使用系统libpng。。。。。。。。。。。。。。。。不
EGL。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。不
OpenVG。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。不
OpenGL:
角度。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。不
桌面OpenGL。。。。。。。。。。。。。。。。。。。。。。。对
动态OpenGL。。。。。。。。。。。。。。。。。。。。。。。不
OpenGL ES 2.0。。。。。。。。。。。。。。。。。。。。。。。。不
OpenGLES3