How to determin the build-combinations of a given Qt app



  • Hi All,

     Given a Qt application executable (i.e., a Qt Windows application), is there any way we can determine, electronically, what Qt library version was used (i.e., if version 5.5.1 or 5.6.0 was used and also, if 32-bit or 64-bit version of it used) to compile the app and also, which C++ compiler was used to compile the app, etc.? Additionally, if the Qt libraries are statically linked with the app or not?
    
     This is a new dilemma that we are facing now, as we get to the task of maintaining multiple versions of Qt based application builds! Appreciate any input you may have on this topic very much.
    

    Thanks,
    -Channa.



  • @Channa

    Well I have e.g. this example, a bit messy but hopefully you get the point:

    QSysInfo::Sizes wsize = QSysInfo::WordSize;
    QSysInfo::Endian bigEndian = QSysInfo::ByteOrder;
    guiLog::msgNoPrompt("# Qt version %s on %d bit platform (%s endian)\n",
    qVersion(), wsize, bigEndian ? "little" : "big");
    #if defined (WIN32)
    guiLog::msgNoPrompt("# Compiled with Visual C++ version %.1f\n", (_MSC_VER - 600.0) / 100.0);
    #elif defined(APPLE)
    #if defined (clang)
    guiLog::msgNoPrompt("# Compiled with clang version %s\n", clang_version);
    #else
    guiLog::msgNoPrompt("# Compiled with gcc version %d.%d.%d\n", GNUC, GNUC_MINOR, GNUC_PATCHLEVEL);
    #endif
    #else
    guiLog::msgNoPrompt("# Compiled with gcc version %d.%d.%d\n", GNUC, GNUC_MINOR, GNUC_PATCHLEVEL);
    #endif


Log in to reply
 

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