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

msbuild failes when building resources if DEFINES in pro file

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.1.0 Beta 1
    • 5.0.1, 5.0.2
    • Build tools: qmake
    • None
    • Windows 7, compiler VS2010
    • 699e44ac03b9898020245b815f81d577fde63216

    Description

      Add define to pro file:
      DEFINES += "APPNAME=\\\"MYAPPNAME\\\""

      Create visual studio project:
      qmake -tp vc

      Build project with msbuild:
      msbuild
      -> error RC2104: undefined keyword or key name: MYAPPNAME

      This worked with 4.8.4 but not with 5.0.1 nor 5.0.2. Building with nmake works in all versions.

      There are differences between 4.8.4 and 5.0.2 vcxproj files.
      In Qt5 there is "<PreprocessorDefinitions> ...APPNAME="MYAPPNAME" ...."
      and in Qt4
      "<PreprocessorDefinitions> ... APPNAME=\"MYAPPNAME\&quot ..."
      When adding missing backslashes to Qt5 vcxproj file, msbuild success building resources.

      Attachments

        1. test.zip
          0.9 kB
          Qt Support

        Issue Links

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

          Activity

            People

              jbornema Joerg Bornemann
              qtcomsupport Qt Support
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes