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

Clang: Info bar with error: "You must build your code with position independent code if Qt was built with -reduce-relocations."

XMLWordPrintable

    • 0dc87382e93d3742aa7d5519b3d51e83a075db1a

      Opening a file with the contents

      #include <QtGlobal>
      int main() {}
      

      within a qbs project like

      import qbs
      QtApplication { files: "main.cpp" }
      

      leads to an info bar displaying the error message:

      qglobal.h:1087:4: 
      error: "You must build your code with position independent code if Qt was built with -reduce-relocations. " "Compile your code with -fPIC (-fPIE is not enough)."
      

      whereas the corresponding qmake project

      TEMPLATE = app
      SOURCES += main.cpp
      

      referencing the same file does not lead to the parse error.

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

            kandeler Christian Kandeler
            kosjar Nikolai Kosjar
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes