[Qt-interest] qmake: suppress version number from library name?

Oliver.Knoll at comit.ch Oliver.Knoll at comit.ch
Wed Jan 5 11:44:00 CET 2011


Hi,

I want to have my libs only called foo.dll or foo.so, but not foo1.dll or foo.1.2.3.so (with symbolic links).

Question: What is the proper way to suppress the version being part of the library name?

So far when I have

  TEMPLATE = lib
  TARGET = foo
  VERSION = 1.2.3

on Unix I was able to suppress the symbolic link generation with

  CONFIG += plugin

I remember that used to work also on Windows, but that is what I observe now (Qt 4.7.1 MinGW on Windows):

Windows:

- When specifying VERSION then the major version is *always* part of the DLL name,
  e.g. foo1.dll - regardless of 'plugin' being present in CONFIG or not

- When /not/ specifying VERSION at all then I get the desired foo.dll name

Linux:
- When specifying VERSION then symbolic links are /not/ created when also specifying
  CONFIG += plugin

- When not specifying VERSION then symbolic links are /still/ generated with some
  default version 1.0.0

Mac:
- Same behaviour as on Linux - however placing the libraries into the application
  Bundle, into the Framework folder, /only/ works if 'plugin' is /not/ present in
  CONFIG (so it seems that 'plugin' has some more effect, other than simply
  suppressing the generation of symbolic links/version numbers being part of
  she library name


So currently on Windows, with Qt 4.7.1 MinGW (binary distribution), I end up with foo1.dll when specifying VERSION=1.2.3. I also noticed that VER_MAJ contains nothing (I would have expected the value "1") when setting VERSION - is that a bug?


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




More information about the Qt-interest-old mailing list