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

Compilation Database Project: Clang CM parsing error: "Compile your code with -fPIC"

XMLWordPrintable

    • Linux/X11
    • be97943372bc80d2440daa20cd658599d765b9a9 (qt-creator/qt-creator/master)

      Similar issues have been reported for other project types. This one is specific to the Compilation Database Project Manager.

      1. Enable the experimental Compilation Database Project Manager plugin
      2. Create a minimal C++ project - I created a qmake-based one and I created it outside Qt Creator
      3. Use e.g. compiledb or bear to create compile_commands.json under the project
      4. Open the project through compile_commands.json in Qt Creator
      5. Open the main C++ source

      An infobar appears in the editor, saying:

      Warning: The code model could not parse an included file, which might lead to incorrect code completion and highlighting, for example:
      qglobal.h:1092: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)."

       

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

            kandeler Christian Kandeler
            martyone Martin Kampas
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There is 1 open Gerrit change