[Qt-interest] embeding version number

Oliver.Knoll at comit.ch Oliver.Knoll at comit.ch
Wed Mar 3 12:17:39 CET 2010


Alexander Kurz wrote on Wednesday, March 03, 2010 8:59 AM:

> ...
> in qmake manual i found that "VERSION = 1.0.0.121" in the pro file
> will do the job. 
> but i cannot find the version number in the binaries.

The VERSION in *.pro files is only applied to shared libraries, if I am not completely wrong: and only on Unix. So for example:

TEMPLATE=lib
VERSION=1.2.3
TARGET=foo

The resulting files and symlinks would be:

libFoo.so -> libFoo.1.so
libFoo.1.so -> libFoo.1.2.so
libFoo.1.2.so -> libFoo.1.2.3.so
libFoo.1.2.3.so

(Unless you specify TEMPLATE=plugin, then you would only get libFoo.1.2.3.so I think - or only libFoo.so, can't remember...).

On Unix VERSION does not have any effect on executables (other than shared libraries), I think.

On Windows VERSION does not have any effect on neither *.exe nor *.dll. You have to use the MS resource compiler for this (you can specify a *.rc file in the *.pro file and qmake calls the resource compiler (rcc?) for you. Check the MSDN on how to create version info for DLLs (*.exe) or create an *.rc file with Visual Studio.

Cheers, Oliver
-- 
Oliver Knoll
Dipl. Informatik-Ing. ETH
COMIT AG - ++41 79 520 95 22



More information about the Qt-interest-old mailing list