Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Syntax highlighting fails when using cross-compiler
Forum Updated to NodeBB v4.3 + New Features

Syntax highlighting fails when using cross-compiler

Scheduled Pinned Locked Moved Solved Installation and Deployment
2 Posts 1 Posters 465 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    stryga42
    wrote on last edited by
    #1

    I moved from an older version of Qt Creator to 4.8.1 with the strange effect that the syntax highlighting fails when using the gcc-linaro-arm-linux-gnueabihf-raspbian-x64 cross compiler. Funny enough, the compilation itself works fine. If I use the default compiler for my machine, highlighting (and compilation) works fine too.
    So the symptoms are:

    • The highlighting worked fine for an older Qt Creator (the latest one at the time when Qt 5.6.2 came out...)

    • There are no issues for "Desktop builds", that is using the default compiler.

    • Compilation is not affected, only syntax highlighting.

    • The compiler in question is the usual linaro ARM cross compiler used for Raspberry Pi

    • The highlighting seems to fail because it can't find include files, but this is only a guess. In the GUI you get a mixture of "unknown type" and "file not found". Include filles affected are std:: includes and low-level, probably compiler specific includes.

    • I am working on Ubunutu 16.04LTS

    • The linaro toolchain was installed through https://github.com/neuronalmotion/qtrpi

    I think the discovery of include files is done by starting the compiler with some option to output the include paths. This mechanism seems to be broken for the combination Qt Creator 4.8.1 + linaro-ARM.
    Does anyone have an idea what to do or how to investigate further? Any hints are warmly welcome.
    If you think I should move to the Qt on Pi forum let me know.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      stryga42
      wrote on last edited by
      #2

      Well, I still don't understand exactly what happens but I solved the problem by using a different flavor of compiler from the same toolchain package. (arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-g++). For this to work I had to set the ABI manually in the Tools->Options->Kits->Compiler->ABI fields. I always thought these fields are auto-detected from the compiler you select but obviously Qt creator accepts your manual selection.

      1 Reply Last reply
      2

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved