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

Setting /MAP without specifying map file in qmake project file could result in invalid Visual Studio project file

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 4.7.1
    • 4.7.0
    • Build tools: qmake
    • None
    • Windows 7, VS 2010, Qt-4.7.0-Beta2
    • 409d41185e85f2eefe6bb4872c4dd3005bef8170

    Description

      Setting 'QMAKE_LFLAGS_DEBUG += /MAP' in .pro file to specify the creation of a map file in a VS project could result in a invalid .vcxproj file.

      See attached example:
      Using Windows 7, VS 2010 and Qt-4.7.0-Beta2. Setting QMAKESPEC=win32-vs2010. Run qmake on test.pro. When opening test.vcxproj in VS2010 get error message (ErrorMessage.png).

      Solution:
      In file 'qmake/generators/win32/msbuild_objectmodel.cpp' line 1573:

      case 0x0034160: // /MAP[:filename]
      GenerateMapFile = _True;
      MapFileName = option+5;
      break;

      Since the map file name is optional the code above could generate a invalid MapFileName. Code should be:
      case 0x0034160: // /MAP[:filename]
      GenerateMapFile = _True;
      if (*(option+4) == ':')
      MapFileName = option+5;
      break;

      Should be also changed in 'qmake/generators/win32/msvc_objectmodel.cpp' line 1431.

      Attachments

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

        Activity

          People

            jbornema Joerg Bornemann
            christof_schultz Christof Schultz
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes