PDA

View Full Version : How to determin the build-combinations of a given Qt app



Channa
22nd March 2016, 14:23
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.

wysota
22nd March 2016, 15:13
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?
You can determine the compiler family used, you can determine whether the app is 32 or 64 bit. You cannot reliably determine the version of Qt the app was compiled against. However if you assume the app has been compiled against Qt version that was deployed with it, you can inspect the library itself and it should have all the information you want (maybe apart detailed compiler info).

anda_skoa
22nd March 2016, 16:15
The version of the Qt Library, if not in the filename, should be extracable from the library fike.

When run


strings libQtCore.so | grep -i version

I get, among other things


This is the QtCore library version 4.8.7


As for static vs. dynamic, that can probably be queried with a Windows tool that does what ldd does on Unix, i.e. show the DLL dependencies.

Cheers,
_