Clang code model and cross compiling toolchain not working in Qt Creator



  • I want to use the Clang Code Model in Qt Creator 4.8.0 for my cross compiling project. I do not want to compile from the IDE. Instead I have scripts that I run from the shell which uses GCC.

    For this scenario, do I still have to do the complete compiler setup under "Kits"? Which settings are mandatory if I don't want to compile?

    I'm asking because I've been trying to integrate Clang into the IDE for a long time, but it always fails. Even telling Clang to use the proper sysroot is a challenge. I can hardly find any information on the internet on how to do this. I've been looking for RaspPi instructions for orientation, but found nothing.



  • Is no one else facing the same problem? I've been trying so hard for weeks now to get the clang code model work with my embedded project. It's so annoying it doesn't work.


  • Qt Champions 2018

    Hi @MrRobot,

    I'm using QtCreator in conjunction with Toradex Apalis iMX.6, and it works perfectly.

    I have, however, set up a Kit so I can compile, deploy and debug from within Creator. Clang is working (mostly) fine in this scenario.

    Regards



  • Hi @aha_1980

    it seems I solved it. The problem was that I added a custom compiler. Once I added a compiler of type GCC, it works perfectly.

    Sorry for cross posting. I found this forum better for my topic. I wasn't able to delete my post in the other one.

    Kind regards,
    MrRobot


  • Qt Champions 2018

    Hi @MrRobot,

    Glad you figured it out. So please mark this topic as SOLVED now.

    Thanks!

    PS: If you want to move a topic later, just ask a moderator to do so (if you can't do yourself).



Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.