[Qt-creator] Qt Creator ignoring gcc compiler in kit

Davide Coppola vivaladav at gmail.com
Wed Dec 19 00:00:48 CET 2018


Hi Tobias and thank you for your reply,

my project is based on qmake and I know that a quick workaround is to set
the value of QMAKE_CXX, but according to the Qt Creator documentation:
"In the Compiler field, select the C or C++ compiler used to build the
project."
so I expect the kit to set the active compiler when building a project.

Everything is fine with Clang, but also with GCC when using CMake or Qbs as
build system.

Anyway, I created https://bugreports.qt.io/browse/QTCREATORBUG-21751 to
provide more details.


On Mon, 17 Dec 2018 at 20:00, Tobias Hunger <tobias.hunger at gmail.com> wrote:

> Hi Davide,
>
> On Mon, Dec 17, 2018 at 4:40 PM Davide Coppola <vivaladav at gmail.com>
> wrote:
>
>> I can't manage to get Qt Creator to use an older compiler on Linux using
>> kits.
>>
>
> The toolchain in the kit is mostly for use in C++ code model. The actual
> build system is told what was set up -- if that is possible.
>
> Which build system are you using?
>
> Qmake is the odd one out here: It tends to hard-code compiler executable
> names into its mkspec files and there is no reliable way to override it. So
> this is kind of expected for qmake...
>
> To have qmake pick up a non-default named compiler, you can try two things:
> * Change the mkspec
> * Create a folder somewhere, put a symlink called gcc/g++ into it and have
> those links point to whatever gcc you want. Then set PATH to include your
> folder before anything else that includes a gcc/g++ binary.
>
> I hope this helps,
> Tobias
>


-- 
*Davide Coppola*

*website:* http://www.davidecoppola.com
*blog:* http://blog.davidecoppola.com

<http://plus.google.com/+DavideCoppola>
<http://www.linkedin.com/in/davidecoppola>
<http://www.twitter.com/vivaladav>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20181219/e1b89ad8/attachment.html>


More information about the Qt-creator mailing list