Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    QtCreator. Mutliple versions of gcc

    Tools
    1
    1
    705
    Loading More Posts
    • 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.
    • Y
      yannickj last edited by

      Hi all,

      I've been using Qt Creator for a few months now (and I'm very happy with it), but mostly as an editor (modify / navigate the code). Recently, I wanted to try to use it as a cross compilation environment using its kit/compiler system.

      Everything seems simple enough when compilers are different eg clang and gcc. However, when I tried to set up g++-4.9 along with the default (g++-4.6) compiler of my ubuntu 12.04, creator will always choose the system's default g++.

      I found several workarounds:

      • Adding built steps with update-alternatives to switch default compiler before starting make.
      • Create a specific mkspec forcing the compiler to g++-4.9
      • Use the variable QMAKE_CXX to specify g++-4.9

      But I feel that there must be an easier way, otherwise what use would it be to specify the full path of the compiler in Tools > Options > Build & Run > Compile ?

      Can anyone help me with that ?
      Thank you.

      1 Reply Last reply Reply Quote 0
      • First post
        Last post