How to find out runtime MinGW version and compile time OpenSSL (inside compile time Qt) version?



  • QT_VERSION_STR — compile time Qt version,
    qVersion() — runtime Qt version,

    QSslSocket::sslLibraryBuildVersionString() — compiled version OpenSSL inside Qt runtime library. (runtime Qt5Core.dll, Qt5Network.dll were compiled with that version of OpenSSL)
    QSslSocket::sslLibraryVersionString() — runtime OpenSSL version

    __GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__ — compile time MinGW version

    How to find out true compile time version OpenSSL (compiled OpenSSL inside compiled time Qt) and runtime MinGW version ?


  • Moderators

    For OpenSSL OPENSSL_VERSION_NUMBER is probably what you're looking for, see here. Be aware that it only makes sense to use when you're in the OpenSSL library itself or in Qt's code that includes OpenSSL headers.

    As for the version of MinGW at runtime - which module do you mean? Each dll could potentially be compiled with different version. To get the version at runtime a compiler would need to inject a function that returns that version into each binary it produces and export it. I don't think it does that and I don't think people would like compiler injecting exported functions into their binaries.



  • @Chris-Kawa I mean libgcc_s_dw2-1.dll, libstdc++-6.dll and libwinpthread-1.dll


  • Moderators

    These are the C,C++ and threading runtime libraries. As far as I can see they don't export anything like that.

    Why do you need this actually? Usually when you deploy an app you deploy it with the runtime libraries you used to compile it.



  • @Chris-Kawa Sometimes you forget to update deploy dlls, in that case runtime vs compiletime versions in "about window" would be helpful.
    Even if you use auto windeployqt command, you'll still need to copy other dlls (OpenSSL, etc) by hand, there you'll forget.



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