Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-29286

VERSION variable in .pro file causes incorrect linking in MSVC2010 projects

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • 5.0.2
    • 4.7.3, 4.8.3, 4.8.4, 5.0.0
    • Build tools: qmake
    • None
    • Windows7 x64
      MS Visual Studio 2010

      When VERSION variable is used in .pro file qmake produces a project which fails to compile with MSVC2010. The reason it fails is because in the project Properties "General->Target Name" is specified as $(TargetName)+$(VER_MAJ) where as in "Linker->Output File" it is simply $(TargetName). To illustrate:

      .pro file:

      VERSION = 1.0.1

      TARGET = QTTest

      General->Target Name = QTTest1
      Linker->Output File = QTTest.exe

      I've noticed that this bug has been introduced somewhere between Qt4.7.0 and Qt4.7.3

      I attach a small test project that can be used to reproduce the problem.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            jbornema Joerg Bornemann
            redoctober0 Red Smith
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes