Qt failed to compile MSVC2017 X86 platform



  • I did a complete compilation of MSVC x86 on windows, but encountered some trouble. The library path of OPENSSL is D:/openssl, and the QT compile parameter is QT5.9.2:

    Configure -prefix d:\Qt\5.9.2\msvc2017_x86 -opensource -debug-and-release -shared -pch -opengl dynamic -angle -combined-angle-lib -qt3d-profile-gl -icu -qt-sqlite -qt3d-profile-jobs -L D:/icu/lib -I D:/icu/include -recheck-all -ssl -qt-zlib -qt-libjpeg -qt-libpng -qt-xcb -qt-xkbcommon -qt-pcre -qt-harfbuzz -LD:/openssl/lib -ID:/openssl/include -make tools -make LIBS -make examples -developer-build -qt-assimp

    A link error occurred in the QtNetwork module:

    Moc_qhttpthreaddelegate_p.obj: external symbol "error public: __thiscall QSslCertificate: LNK2019: could not parse: QSslCertificate (class QByteArray const & enum, QSsl:: EncodingFormat)" (? 0QSslCertificate@@QAE@ABVQByteArray@@? W4EncodingFormat@QSsl@@@Z), the symbol "public: __thiscall QList<class in function QSslError>:: ~QList<class QSslError> (void)" (?? 1? $QList@VQSslError@@@@QAE@XZ) cited
    Moc_qnetworkfile_p.obj: external symbol "error public: __thiscall QSslCertificate: LNK2001: could not parse: QSslCertificate (class QByteArray const & enum, QSsl:: EncodingFormat)" (? 0QSslCertificate@@QAE@ABVQByteArray@@W4EncodingFormat@QSsl? @@@Z)
    Moc_qhttp2protocolhandler_p.obj: external symbol "error public: __thiscall QSslCertificate: LNK2001: could not parse: QSslCertificate (class QByteArray const & enum, QSsl:: EncodingFormat)" (? 0QSslCertificate@@QAE@ABVQByteArray@@? W4EncodingFormat@QSsl@@@Z)
    Moc_qnetworkaccessftpbackend_p.obj: external symbol "error public: __thiscall QSslCertificate: LNK2001: could not parse: QSslCertificate (class QByteArray const & enum, QSsl:: EncodingFormat)" (? 0QSslCertificate@@QAE@ABVQByteArray@@? W4EncodingFormat@QSsl@@@Z)
    Moc_qnetworkaccessdebugpipebackend_p.obj: external symbol "error public: __thiscall QSslCertificate: LNK2001: could not parse: QSslCertificate (class QByteArray const & enum, QSsl:: EncodingFormat)" (? 0QSslCertificate@@QAE@ABVQByteArray@@? W4EncodingFormat@QSsl@@@Z)
    Moc_qnetworkaccessfilebackend_p.obj: external symbol "error public: __thiscall QSslCertificate: LNK2001: could not parse: QSslCertificate (class QByteArray const & enum, QSsl:: EncodingFormat)" (? 0QSslCertificate@@QAE@ABVQByteArray@@? W4EncodingFormat@QSsl@@@Z)

    Asking for help.


  • Lifetime Qt Champion

    Hi,

    Did you check the configure summary ? Are you sure that the OpenSSL support was successfully activated ?

    By the way, which version of OpenSSL are you using ? Are you sure it's built with MSVC2017 ?



  • @SGaist said in Qt failed to compile MSVC2017 X86 platform:

    Hi,
    Did you check the configure summary ? Are you sure that the OpenSSL support was successfully activated ?
    By the way, which version of OpenSSL are you using ? Are you sure it's built with MSVC2017 ?

    I have to check the configuration information, OpenSSL Header has been detected, the configuration without OpenSSL detection, the use of OpenSSL is the highest official version of the OpenSSL, I am sure that use MSVC2017 x86.
    I used to use -openssl-linked, and the OpenSSL detection, configuration changes after the error is found, with -ssl instead of -openssl-linked is still wrong.



  • @SGaist This is configuration information. I just confirmed it:
    Build options:
    Mode ................................... debug and release; default link: debug; optimized tools
    Optimize release build for size ........ no
    Building shared libraries .............. yes
    Using C++ standard ..................... C++11
    Using gold linker ...................... no
    Using precompiled headers .............. yes
    Using LTCG ............................. no
    Target compiler supports:
    SSE .................................. SSE2 SSE3 SSSE3 SSE4.1 SSE4.2
    AVX .................................. AVX AVX2 F16C
    AVX512 ............................... <none>
    Build parts ............................ tools libs examples
    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
    QML debugging .......................... yes
    udev ................................... no
    Using system zlib ...................... no
    Qt Core:
    DoubleConversion ....................... yes
    Using system DoubleConversion ........ no
    GLib ................................... no
    iconv .................................. no
    ICU .................................... yes
    Logging backends:
    journald ............................. no
    syslog ............................... no
    slog2 ................................ no
    Using system PCRE2 ..................... no
    Qt Network:
    getaddrinfo() .......................... no
    getifaddrs() ........................... no
    IPv6 ifname ............................ no
    libproxy ............................... no
    OpenSSL ................................ yes
    Qt directly linked to OpenSSL ........ no
    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 .................................... yes
    OpenVG ................................. no
    OpenGL:
    ANGLE ................................ yes
    Combined ANGLE Library ............... yes
    Desktop OpenGL ....................... no
    Dynamic OpenGL ....................... yes
    OpenGL ES 2.0 ........................ no
    OpenGL ES 3.0 ........................ no
    OpenGL ES 3.1 ........................ no
    Session Management ..................... yes
    Features used by QPA backends:
    evdev .................................. no
    libinput ............................... no
    INTEGRITY HID .......................... no
    mtdev .................................. no
    tslib .................................. no
    xkbcommon-evdev ........................ no
    QPA backends:
    DirectFB ............................... no
    EGLFS .................................. no
    LinuxFB ................................ no
    VNC .................................... no
    Mir client ............................. no
    Windows:
    Direct 2D ............................ yes
    DirectWrite .......................... yes
    DirectWrite 2 ........................ yes
    Qt Widgets:
    GTK+ ................................... no
    Styles ................................. Fusion Windows WindowsXP WindowsVista
    Qt PrintSupport:
    CUPS ................................... no
    Qt Sql:
    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 SerialBus:
    Socket CAN ............................. no
    Socket CAN FD .......................... no
    QtXmlPatterns:
    XML schema support ..................... yes
    Qt QML:
    QML interpreter ........................ yes
    QML network support .................... 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
    Path support ........................... yes
    PathView item .......................... yes
    Positioner items ....................... yes
    ShaderEffect item ...................... yes
    Sprite item ............................ yes
    Qt Gamepad:
    SDL2 ................................... no
    Qt 3D:
    Assimp ................................. yes
    System Assimp .......................... no
    Output Qt3D Job traces ................. yes
    Output Qt3D GL traces .................. 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
    Qt Sensors:
    sensorfw ............................... no
    Qt Quick Controls 2:
    Styles ................................. Default 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:
    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
    Media player backend ................... DirectShow
    Qt WebEngine:
    Embedded build ......................... no
    Pepper Plugins ......................... yes
    Printing and PDF ....................... yes
    Proprietary Codecs ..................... no
    Spellchecker ........................... yes
    WebRTC ................................. yes
    Using system ninja ..................... no


  • Lifetime Qt Champion

    Again, what version of OpenSSL are you using ? Because the 1.1 version broke API and ABI compatibility so if you want to use it you have to build Qt 5.10. Otherwise get the latest 1.0 version.



  • @SGaist Do you have QT 5.10 now? Like the latest is QT5.9.2, I'm using the latest OPENSSL 1.1.0g, using OPENSSL 1.0.2m should be able to? I'll try it


  • Lifetime Qt Champion

    5.10 Beta 4 was just released.

    Like I wrote before: Qt lower than 5.10 work only with OpenSSL 1.0.X



  • @SGaist Oh, to use the following things is a pre release version, the official version of the QT 5.9.2 option, but now has encountered new problems, encountered the following error at compile time:
    Renderer.obj: external symbol "error public: static struct LNK2001: cannot resolve QMetaObject const Qt3DCore:: Debug:: AspectCommandDebugger:: staticMetaObject (staticMetaObject@AspectCommandDebugger@Debug@Qt3DCore@@2UQMetaObject@@B?)
    ....\lib\Qt53DRenderd.dll: fatal error LNK1120: 1 external commands that cannot be resolved


  • Lifetime Qt Champion

    Just to be on the safe side, did you do a full clean re-build ?



  • @SGaist said in Qt failed to compile MSVC2017 X86 platform:

    Just to be on the safe side, did you do a full clean re-build ?

    Yes, I don't know why this happens when I open the -qt3d-profile-jobs. In the latest compilation operation, I don't want to open this option


  • Lifetime Qt Champion

    What do you mean by "open this option" ?



  • This post is deleted!


  • This post is deleted!


  • @SGaist said in Qt failed to compile MSVC2017 X86 platform:

    What do you mean by "open this option" ?

    The configure script executed at compile time adds -qt3d-profile-jobs and -qt3d-profile-gl parameters to compile, but makes errors


  • Lifetime Qt Champion

    AFAIK, you should be able to disable both through options.



  • @SGaist said in Qt failed to compile MSVC2017 X86 platform:

    AFAIK, you should be able to disable both through options.

    Yes, I'm not using it now


  • Lifetime Qt Champion

    So the compilation goes further ?



  • @SGaist said in Qt failed to compile MSVC2017 X86 platform:

    So the compilation goes further ?

    Yes, the compilation is underway



  • @SGaist Why did I compile QT in qtwebengine chromium code problems caused by errors, do not know how you solve it? Do you need transcoding every time? The operating system I use is windows


  • Lifetime Qt Champion

    @jack9603301 said in Qt failed to compile MSVC2017 X86 platform:

    @SGaist Why did I compile QT in qtwebengine chromium code problems caused by errors, do not know how you solve it? Do you need transcoding every time? The operating system I use is windows

    Sorry, I don't understand what you wrote here.



  • @SGaist said in Qt failed to compile MSVC2017 X86 platform:

    Sorry, I don't understand what you wrote here.

    In China, I do QT5.9.2 complete compile, but in the qtwebengine module compile compile error, error information from coding problems to grammatical errors are, what's the matter?


  • Moderators

    @jack9603301 Can you post the errors?



  • @jsulm said in Qt failed to compile MSVC2017 X86 platform:

    Can you post the errors?

    Sorry, I checked the data myself. I'm trying to modify the operating system locale and recompile the QT, so I can't post the error prompt



  • @jsulm D:\qt\src\qt-everywhere-opensource-src-5.9.2\qtwebengine\src\3rdparty\chromium\cc\base\index_rect.h (46): error C2059: syntax error: "public""
    D:\qt\src\qt-everywhere-opensource-src-5.9.2\qtwebengine\src\3rdparty\chromium\cc\base\index_rect.h (48): error C4430: - int is assumed to be lack of the type specifier. Note: C++ does not support default int
    D:\qt\src\qt-everywhere-opensource-src-5.9.2\qtwebengine\src\3rdparty\chromium\cc\base\index_rect.h (48): error C2550: "cc:: IndexRect": constructor initializer list can only be used in constructor definitions
    D:\qt\src\qt-everywhere-opensource-src-5.9.2\qtwebengine\src\3rdparty\chromium\cc\base\index_rect.h (48): warning C4508: "cc:: IndexRect": the function should return a value; assume the "void" return type
    D:\qt\src\qt-everywhere-opensource-src-5.9.2\qtwebengine\src\3rdparty\chromium\cc\base\index_rect.h (47): error C3615: constexpr function "cc:: IndexRect" does not generate constant expressions
    D:\qt\src\qt-everywhere-opensource-src-5.9.2\qtwebengine\src\3rdparty\chromium\cc\base\index_rect.h (48): note: controls access to the end of the constexpr function, resulting in a failure
    D:\qt\src\qt-everywhere-opensource-src-5.9.2\qtwebengine\src\3rdparty\chromium\cc\base\index_rect.h (50): error C2588: ":: ~IndexRect": illegal global destructor
    D:\qt\src\qt-everywhere-opensource-src-5.9.2\qtwebengine\src\3rdparty\chromium\cc\base\index_rect.h (50): error C4430: - int is assumed to be lack of the type specifier. Note: C++ does not support default int
    D:\qt\src\qt-everywhere-opensource-src-5.9.2\qtwebengine\src\3rdparty\chromium\cc\base\index_rect.h (50): error C2610: "int cc:: IndexRect (void)": not a special member function that can be considered silently
    D:\qt\src\qt-everywhere-opensource-src-5.9.2\qtwebengine\src\3rdparty\chromium\cc\base\index_rect.h (52): error C2270: "left": modifiers are not allowed on non member functions
    D:\qt\src\qt-everywhere-opensource-src-5.9.2\qtwebengine\src\3rdparty\chromium\cc\base\index_rect.h (52): error C2065: "left_": undeclared identifier
    D:\qt\src\qt-everywhere-opensource-src-5.9.2\qtwebengine\src\3rdparty\chromium\cc\base\index_rect.h (52): error C3615: constexpr function "cc:: left" does not generate constant expressions



  • The first full compilation of QT5.9.2 has been completed. Thank you


  • Lifetime Qt Champion

    Did you need to do any modification in order to succeed ?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.