Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-12770

Add library dialogue results in pro file syntax error when using Mingw

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • Qt Creator 3.2.0
    • Qt Creator 3.1.2
    • None
    • Windows 7, Mingw, QtCreator 3.1.2, QT5.2.1
    • 9109dd465b7fcdad822a0be804d63446f76c398a

    Description

      Related to issue QTCREATORBUG-10423.

      Using mingw.
      I wish to add an existing library to my project. I select the .lib through the "Add Library" dialogue. I choose the "External Library" choice, select the library file and include path. I uncheck "Linux" and "Mac", check "Static" and uncheck the three "Windows" options.

      The following entries are added to my .pro file:

      win32: LIBS += -L$$PWD/../../MatlabCode/coderOutput/pelletImageAnalysisMethods/codegen/lib/pelletAnalysis/ -lpelletAnalysis
      INCLUDEPATH += $$PWD/../../MatlabCode/coderOutput/pelletImageAnalysisMethods/codegen/lib/pelletAnalysis
      DEPENDPATH += $$PWD/../../MatlabCode/coderOutput/pelletImageAnalysisMethods/codegen/lib/pelletAnalysis
      win32:!win32-g++ PRE_TARGETDEPS += $$PWD/../../MatlabCode/coderOutput/pelletImageAnalysisMethods/codegen/lib/pelletAnalysis/pelletAnalysis.lib
      else:win32-g++: PRE_TARGETDEPS += $$PWD/../../MatlabCode/coderOutput/pelletImageAnalysisMethods/codegen/lib/pelletAnalysis/libpelletAnalysis.a
      

      Note the missing semi-colon after the g++ in the second last line. The project fails to build with error:
      Assignment needs exactly one word on the left hand side.

      It should read:

      win32:!win32-g++: PRE_TARGETDEPS += $$PWD/../../MatlabCode/coderOutput/pelletImageAnalysisMethods/codegen/lib/pelletAnalysis/pelletAnalysis.lib
      

      Attachments

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

        Activity

          People

            jkobus Jarek Kobus
            stephenf555 Stephen Faul
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes