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

Details

    • 0dc87382e93d3742aa7d5519b3d51e83a075db1a

    Description

      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.

      Attachments

        Issue Links

          For Gerrit Dashboard: QTCREATORBUG-17207
          # Subject Branch Project Status CR V

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes