1

Suppose I have an executable that uses qt library. I want to replace the shared object with a custom one. So how do I find the qt version so that I can build it myself from source?

P.S. All the files has names like libQt5**.so.5.

nomem
  • 1,568
  • 4
  • 17
  • 33
  • For DLLs right-click a DLL, go to properties, details, the version will be listed there. Maybe there is something similar in linux for so libs – dtech Apr 27 '16 at 11:28
  • @ddriver I use ubuntu 14.04. There's no such thing here. – nomem Apr 27 '16 at 11:31

1 Answers1

1

If you don't own a very special setup the exact version is part of the lib name; all others are symlinks. E. g. installed here is Qt 4.8.1:

$ ls -l /usr/lib/i386-linux-gnu/libQtCore.*
-rw-r--r-- 1 root root  680 Mai 27  2015 /usr/lib/i386-linux-gnu/libQtCore.prl
lrwxrwxrwx 1 root root   18 Mai 27  2015 /usr/lib/i386-linux-gnu/libQtCore.so -> libQtCore.so.4.8.1
lrwxrwxrwx 1 root root   18 Mai 27  2015 /usr/lib/i386-linux-gnu/libQtCore.so.4 -> libQtCore.so.4.8.1
lrwxrwxrwx 1 root root   18 Mai 27  2015 /usr/lib/i386-linux-gnu/libQtCore.so.4.8 -> libQtCore.so.4.8.1
-rw-r--r-- 1 root root 2,9M Mai 27  2015 /usr/lib/i386-linux-gnu/libQtCore.so.4.8.1

Additionally the libs provide macros and functions to access the version at build and run time: QT_VERSION, QT_VERSION_STR and qVersion().

Murphy
  • 3,827
  • 4
  • 21
  • 35