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.hun...@gmail.com> wrote:

> Hi Davide,
>
> On Mon, Dec 17, 2018 at 4:40 PM Davide Coppola <vivala...@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>
_______________________________________________
Qt-creator mailing list
Qt-creator@qt-project.org
https://lists.qt-project.org/listinfo/qt-creator

Reply via email to